-
Hello,
Just tried to delete all post categories (left-overs from commercial theme’s demo-data), received white screen with thse 2 error messages:
Warning: Invalid argument supplied for foreach() in /home/customer/www/XXX/public_html/wp-content/plugins/seo-by-rank-math/includes/class-cmb2.php on line 304
Warning: Cannot modify header information – headers already sent by (output started at /home/customer/www/XXX/public_html/wp-content/plugins/seo-by-rank-math/includes/class-cmb2.php:304) in /home/customer/www/XXX/public_html/wp-includes/pluggable.php on line 1265
After returning to the previous page (naturally, the list of post categories), I found the categories indeed were deleted. But my guess is that your plugin is doing some post-deletion checks, similar to what happens when I delete posts massively, to maybe warn about URLs.
PS. The categories being deleted had 0 posts in each. So the scenario went as following: delete ALL posts, get a ton of URL warnings from your plugin. Then delete all categories, receive the white screen with the error.
I think you can have a good idea how to reproduce the problem, and consequentially fix it.
Thank you.
Sincerely,
Mick
The ticket ‘Invalid argument supplied for foreach in class-cmb2.php on line 304’ is closed to new replies.