Hi,
You get this error when you try to save the settings?
Or directly when you arrived on the settings page?
Directly when I arrive at the settings page. It shows just after the “Comments 0” checkbox label.
I managed to track it down to this line in functions.php of my child theme:
`ini_set( ‘display_errors’, 1 );’
The error shows when the line is in-play, but not otherwise. All other stuff in functions.php commented out. All other plugins deactivated.
Line 56 in form.php is working out the size of the sub-menu, but the Comments menu item doesn’t have a sub-menu, causing sizeof() to fail. The @ should silence the error but its not doing so with display_errors on.
So it looks like its just my setup, not a general issue.
It’s strange that the sizeof trigger an error, cause sizeof should return only a warning if the parameter is not of type countable.
But i see there is similar bug with this function on PHP8.0. Are you on this version on your environment?
Edit: The documentation says it’s normal in PHP8.0 that an error is triggered. See here in change log: https://www.php.net/manual/en/function.count.php
So i’ll need to change my code to avoid this in a next version.
-
This reply was modified 5 years ago by
manu225.
Yes, 8.0.3. With 7.4 I don’t see the error.
With 8 and errors off, there is no error message but the list of menu items is truncated at Comments. With 7.4 I see the full list of menu items.
Thanks for the confirmation.
I’ll do an update to fix that next week.
Hi,
I just released the version 1.30, that fix the bug with PHP8.
Can you confirm it work on your environment?
Yes thank you, works well with PHP8.
As with other similar admin-menu plugins, WPBakery Page Builder v5.6, About & Templates menu items are not hidden. I think this is because Bakery doesn’t follow the rules. Its using two keys, vc-general & vc-welcome. It should be using only the one key. I got round it with a custom line.
Ok cool, thanks for the feedback 🙂
Can you tell me what is your custom line? So maybe i’ll can fix this bug too.