The plugin is filling my debug.log with warnings
-
My debug.log is filled with the following warning:
PHP Deprecated: Automatic conversion of false to array is deprecated in /home/lqhgtwnz/public_html/wp-content/plugins/seo-by-rank-math/includes/helpers/class-wordpress.php on line 281
I’ve seen this issue reported other times many months ago, but there is no fix yet.
I’m aware of the existence of the following filter: https://rankmath.com/kb/filters-hooks-api-developer/#prevent-image-setting-og
However, I don’t want to prevent it, as I would be missing in features. I just want the plugin to handle the variable correctly so that it doesn’t throw a PHP Deprecated notice. Looks like all you need to do is to add an
is_array()
and setting the array manually if false in order to avoid the automatic conversion.This issue is adding a new row to the log for each page visited, and that sums up quickly, using more resources, increasing the file size of the log, and making it difficult to find the important logs.
- You must be logged in to reply to this topic.