Warning with Null values on class-facebook.php/class-opengraph.php/class-jsonld

#1119523
  • As described on the WordPress.org ticket:

    This is the old post: https://wordpress.org/support/topic/php-warning-null-on-post_author/

    The warnings I see are below:

    [30-Sep-2025 15:15:47 UTC] PHP Warning: Attempt to read property “post_author” on null in /wp-content/plugins/seo-by-rank-math/includes/opengraph/class-facebook.php on line 325
    [30-Sep-2025 15:15:47 UTC] PHP Warning: Attempt to read property “post_author” on null in /wp-content/plugins/seo-by-rank-math/includes/opengraph/class-facebook.php on line 330
    [30-Sep-2025 15:15:47 UTC] PHP Warning: Attempt to read property “post_date” on null in /wp-content/plugins/seo-by-rank-math/includes/opengraph/class-facebook.php on line 311
    [30-Sep-2025 15:15:47 UTC] PHP Warning: Attempt to read property “post_modified” on null in /wp-content/plugins/seo-by-rank-math/includes/opengraph/class-facebook.php on line 312
    [30-Sep-2025 15:15:47 UTC] PHP Warning: Attempt to read property “ID” on null in /wp-content/plugins/seo-by-rank-math/includes/modules/schema/class-opengraph.php on line 67
    [30-Sep-2025 15:15:47 UTC] PHP Warning: Attempt to read property “ID” on null in /wp-content/plugins/seo-by-rank-math/includes/modules/schema/class-opengraph.php on line 77
    [30-Sep-2025 15:15:47 UTC] PHP Warning: Attempt to read property “ID” on null in /wp-content/plugins/seo-by-rank-math/includes/modules/schema/class-jsonld.php on line 139
    [30-Sep-2025 15:15:47 UTC] PHP Warning: Attempt to read property “post_modified” on null in /wp-content/plugins/seo-by-rank-math/includes/modules/schema/class-jsonld.php on line 749
    [30-Sep-2025 15:15:47 UTC] PHP Warning: Attempt to read property “post_date” on null in /wp-content/plugins/seo-by-rank-math/includes/modules/schema/class-jsonld.php on line 750
    [30-Sep-2025 15:15:47 UTC] PHP Warning: Attempt to read property “post_type” on null in /wp-content/plugins/seo-by-rank-math/includes/modules/schema/class-jsonld.php on line 758
    [30-Sep-2025 15:15:47 UTC] PHP Warning: Attempt to read property “post_author” on null in /wp-content/plugins/seo-by-rank-math/includes/modules/schema/class-jsonld.php on line 764
    [30-Sep-2025 15:15:47 UTC] PHP Warning: Attempt to read property “post_modified” on null in /wp-content/plugins/seo-by-rank-math/includes/modules/schema/class-jsonld.php on line 767

    Let me know if there is any solution for the above.

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

    We apologize for the issue you are facing with the PHP warnings related to null values in the Rank Math plugin. These warnings typically occur when the code attempts to access properties of a variable that is not set or is null. This can happen due to various reasons, such as missing post data or conflicts with other plugins or themes.

    To resolve this issue, we recommend the following steps:

    1. Update Rank Math: Ensure that you are using the latest version of the Rank Math plugin, as updates often include bug fixes and improvements.
    2. Check for Conflicts: Deactivate all other plugins and switch to a default theme (like Twenty Twenty-One) to see if the warnings persist. If they disappear, reactivate your plugins one by one to identify the conflicting plugin.
    3. Debugging: If you are comfortable with debugging, you can add checks in the code to ensure that the variables are not null before accessing their properties. However, modifying plugin code is not generally recommended unless you are familiar with PHP.
    4. Contact Support: If the issue continues, please reply to your ticket with any additional details about your setup, including your site URL, so that a human agent from our support team can assist you further.

    Thank you for bringing this concern to our attention! We appreciate your patience as we work to resolve it.

    Sources:
    Fatal Error Happening on Some Installations After 1.0.49 Update » Rank Math

    This is an automated reply from Rank Math Support Bot. Your ticket has been assigned to a human agent and we will get back to you shortly.

    Hello,

    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.

    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    Looking forward to helping you.

    Thank you.

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

You must be logged in to reply to this ticket.