A rare error under PHP 8.1
-
Hello,
I bumped into an error while I was testing the plugin together with User Switching on PHP 8.1 & WP 6.4.1.
PHP Fatal error: Uncaught TypeError: array_filter(): Argument #1 ($array) must be of type array, null given in /home/nginx/domains/mealplans.5dinners1hour.com/public/wp-content/plugins/soliloquy-lite/includes/admin/common.php:206
It happened when I tried to access WP-Admin as a non-admin user (with User Switching).
The fix seems to be easy: the $submenu[‘edit.php?post_type=soliloquy’] variable needs to be checked if is an array and use an empty array instead if it’s a NULL value.
(I patched it locally and works, but would be great to see it in the next version, too)Best regards,
Ervin
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘A rare error under PHP 8.1’ is closed to new replies.