• Resolved Gerard Reches

    (@gerardreches)


    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.

Viewing 1 replies (of 1 total)
  • Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @gerardreches,

    Thank you for your query and we are so sorry about the trouble this must have caused.

    We currently don’t experience this error from our end. Can you please check if you are using the latest version of our plugin? Also, please head over to your WP Dashboard > Rank Math > Status & Tools > System Status and click the “Copy System Info to Clipboard” button, and paste it here so we can further analyze the issue.

    Looking forward to helping you.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.