Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to access array offset on value of type bool #162

Open
capnolithyl opened this issue Feb 6, 2024 · 1 comment
Open

Trying to access array offset on value of type bool #162

capnolithyl opened this issue Feb 6, 2024 · 1 comment

Comments

@capnolithyl
Copy link

We are currently switching our websites from PHP 7.4 to PHP 8 and encountered an issue in the WP dashboard (/wp-admin/index.php).

Warning: Trying to access array offset on value of type bool in /public_html/wp-content/plugins/adminimize/inc-setup/dashboard.php on line 154

Here is the line in question:

$value['title'] = ($value['title'] == FALSE) ? [] : $value['title'];

I think there needs to be another check if $value is an array. I came across this a couple times since switching to PHP 8.

The warnings show up above the div#wpwrap about 70 times or so and make the dashboard nigh unusable. Sometimes the menu items just disappear. As soon as you're in one of the submenus the warnings disappear and you can use the dashboard normally as long as you don't go back to /wp-admin/index.php.

@bueltge
Copy link
Collaborator

bueltge commented May 3, 2024

You are sure, because the current line from your error message are different?
See https://github.com/wp-media/adminimize/blob/master/inc-setup/dashboard.php#L154

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants