[PHP 8.1] fatal error on configuration page #1539

Closed
opened 2026-10-05 00:47:35 +02:00 by adam · 0 comments
Owner

On page [admin > configuration > option], I get:

Fatal error: Uncaught TypeError: array_merge(): Argument #1 must be of type array, null given in local/config/config.inc.php:16

Stack trace:
#0 local/config/config.inc.php(16): array_merge()
#1 admin/configuration.php(332): include('...')
#2 admin/configuration.php(341): order_by_is_local()
#3 admin.php(320): include('...')
#4 {main}
thrown in local/config/config.inc.php on line 16

On line 15 of local/config/config.inc.php I have:

  $conf['file_ext'] = array_merge(
    // isset($conf['picture_ext']) ? $conf['picture_ext'] : array(),
    $conf['picture_ext'],
    array('pdf', 'tiff', 'tif', 'psd', 'eps', 'ai', 'svg')
  );

That's because $conf['picture_ext'] is not set and PHP 8.1 does not like that.

On page [admin > configuration > option], I get: > <b>Fatal error</b>: Uncaught TypeError: array_merge(): Argument #1 must be of type array, null given in local/config/config.inc.php:16 > > Stack trace: > #0 local/config/config.inc.php(16): array_merge() > #1 admin/configuration.php(332): include('...') > #2 admin/configuration.php(341): order_by_is_local() > #3 admin.php(320): include('...') >#4 {main} > thrown in <b>local/config/config.inc.php</b> on line <b>16</b><br /> On line 15 of `local/config/config.inc.php` I have: ``` $conf['file_ext'] = array_merge( // isset($conf['picture_ext']) ? $conf['picture_ext'] : array(), $conf['picture_ext'], array('pdf', 'tiff', 'tif', 'psd', 'eps', 'ai', 'svg') ); ``` That's because `$conf['picture_ext']` is not set and PHP 8.1 does not like that. <!-- github-sync-id:1414904795 -->
adam closed this issue 2026-10-05 00:47:35 +02:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#1539