Dadabik 11.8 generates notice re Undefined Index when running on PHP7

deep64blue

DaDaBIK Guru
This notice appears on every page on a Dadabik 11.8 instance when the web server is running PHP7, it does not appear on servers running PHP8.

Code:
Notice: Undefined index: custom_css in /home/alan/WebRoot/testDB/include/header.php on line 119

Your current DaDaBIK version
You are using DaDaBIK version 11.8-Elba platinum, installed on 12-29-2022 (installation code: 1856663ad2c77cdd5f), the latest version of DaDaBIK is 11.8-Elba released on 12-05-2022

You are running the latest release of DaDaBIK

In case you want to upgrade to a more powerful edition (from Pro to Enterprise/Platinum, from Enterprise to Platinum) please contact us.

System info
PHP Version: 7.4.29

mysql version: 5.5.5-10.4.24-MariaDB

Web server: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1

Client: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36

URL installation: http://localhost/WebRoot/testDB/
 

eugenio

Administrator
Staff member
Hello,
thanks for the report, did you set $dont_use_admin_config = 1? If yes, I confirm the bug and it will be fixed for the next release of DaDaBIK.
Temporary workaround: add to your config_custom.php file this line

$config['custom_css'] = '';

This workaround only works if you don't want to set the custom CSS through the new layout panel in the admin section, if you do it, your custom CSS won't work.

I don't think the bug is related to the PHP version, probably your PHP 8 settings are less informative about errors and warnings, but the warning is generated with PHP 8 as well.

Best,
 

deep64blue

DaDaBIK Guru
Just to confirm my PHP8 wasn't set up correctly and so the error wasn't being shown.

The supplied fix has removed the error, thanks!
 
Top