php webinterface: php8: Uncaught TypeError:

FreeBSD User <[email protected]> Sun, 30 Jan 2022 16:26:47 +0100
Newsgroups gmane.text.refdb.general
Message-ID <20220130162647.7c66242d@hermann>
Hello folks,

despite the fact that refDB is pretty inactive, it is still in use on several private
projects and internal installations. The base OS is always FreeBSD (I'm officially the
FreeBSD mainatiner so far).

Sources: most recent copy of the subversion repo provided by source forge.

Since FreeBSD ports now switched from php 7.4 to 8.0 as the default, the php-driven
webinterface is broken and it seems this error is very common in the group of those
switching from php 7.4 to 8.0. The error is triggered by

phpweb/idex.php.in

The apache's log reports:

[..]
 PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in
 /usr/local/share/refdb/www/index.php:900\nStack trace:\n#0 {main}\n  thrown in
 /usr/local/share/refdb/www/index.php on line 900, referer:
 https://my-host.local/refdb/index.php?thisPage=Search%20indices

$defaultValue seems to be treated as STRING but should be ARRAY

How can this be solved?

Kind regards,

Oliver