array error on login screen
2 posts by 2 authors in: Forums > CMS Builder
Last Post: December 30, 2020 (RSS)
By rez - December 30, 2020 - edited: December 30, 2020
CMS Builder v3.53 (Build 2265)
Notice: Trying to access array offset on value of type bool in /home4/totalima/public_html/website.com/cmsb/lib/menus/header_functions.php on line 177
I have been getting the above error on the login screen. I was ignoring it since this was just an installation for various experiments.
I was using php 7.3. I switched to 7.2 and it goes away. However, the General settings gives me the security warning: Upgrade to PHP v7.3 or newer (Your server is running PHP v7.2.34)
Please advise.
Edit: I switched back to PHP 7.3. The error has not returned... odd. My error log was filled with it before. No new entries in the error log which I have now cleared. Staying with PHP 7.3. Not sure what that error meant. Any idea what was happening? Going to now upgrade and check out the media library... *shrug*
By hans - December 30, 2020
This is the problematic line 177:
elseif (@$menu['visibility'] == 'requireAdmin' && !empty($CURRENT_USER['isAdmin'])) { $userHasMenuAccess = true; } // allow access to admin for admin menus
My best guess is, $CURRENT_USER was false, since you were not logged in, but the checking still happened. In any case, it's a very rare case and won't happen very often.
If you run into more problems like it in the future, feel free to reply here.
PHP Programmer (In Training)
interactivetools.com