PHP Warnings with RankMath

#1109434
  • Resolved Dan Dawson
    Rank Math free

    When RankMath is active on my site the logs fill up with these Warnings. I know they don’t hurt anything right now, but are they going to be addressed in future versions?

    PHP Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/compactflash.org/wp-includes/kses.php on line 1807

    [25-Sep-2025 21:23:12 UTC] PHP Warning: Undefined array key “height” in /var/www/compactflash.org/wp-content/plugins/seo-by-rank-math/includes/modules/schema/class-jsonld.php on line 476

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    We apologize for the issues you are facing with PHP warnings while using Rank Math. These warnings can indeed clutter your logs, and while they may not cause immediate harm, it’s understandable to want them addressed.

    The warnings you mentioned, such as the deprecated preg_replace() and the undefined array key, are typically related to compatibility with PHP versions and how certain functions are handled. Our development team is continuously working on improving the plugin and addressing such issues in future updates.

    For now, we recommend keeping your Rank Math plugin updated to the latest version, as updates often include fixes for known issues. If you continue to experience these warnings, please reply to this ticket with your site URL so that we can investigate further. A human agent from our support team will be able to assist you more comprehensively.

    Thank you for bringing this to our attention!

    Sources:
    How to Fix Undefined Offset: 0 Warning » Rank Math

    Hello,

    Thank you for contacting us, and sorry for any inconvenience that might have been caused.

    This seems to be related to a corrupted schema template applied to the page/post.

    For troubleshooting, please temporarily disable schema templates on your website. You can disable the schema template by sending it to the trash.

    If disabling schema templates works, you will have to delete and regenerate the schema templates one by one until the error stops occurring.

    We are looking forward to hearing from you.

    Thank you.

    Dan Dawson
    Rank Math free

    Thank you, it looks like disabling/resetting the Schema Templates did resolve the issue, I will monitor and see if it comes back again.

    I found the potential issue, my Schema for Pages it was set to “Schema Type: None” and likely setting a type there might have resolved it.

    Thank you for your assistance.

    Hello,

    Glad that everything has been sorted out.

    Please feel free to reach out to us again in case you need any other assistance.

    We are here to help.

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this ticket.