PHP Fatal error in error log

#181384
  • Resolved Tony Iannelli
    Rank Math free

    Hi there,
    i can see in the error log that something are logged some PHP Fatal errors but it’s always the same one and i don’t know what’s wrong and how to fix it.

    [09-Apr-2021 13:36:22 UTC] PHP Fatal error: Uncaught TypeError: get_class(): Argument #1 ($object) must be of type object, bool given in /home/ayzulgoj/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-redirector.php:401
    Stack trace:
    #0 /home/ayzulgoj/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-redirector.php(401): get_class(false)
    #1 /home/ayzulgoj/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-redirector.php(240): RankMath\Redirections\Redirector->get_current_object_type()
    #2 /home/ayzulgoj/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-redirector.php(120): RankMath\Redirections\Redirector->from_cahce()
    #3 /home/ayzulgoj/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-redirector.php(83): RankMath\Redirections\Redirector->flow()
    #4 /home/ayzulgoj/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-redirections.php(81): RankMath\Redirections\Redirector->__construct()
    #5 /home/ayzulgoj/public_html/wp-includes/class-wp-hook.php(292): RankMath\Redirections\Redirections->do_redirection(Object(WP))
    #6 /home/ayzulgoj/public_html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array)
    #7 /home/ayzulgoj/public_html/wp-includes/plugin.php(551): WP_Hook->do_action(Array)
    #8 /home/ayzulgoj/public_html/wp-includes/class-wp.php(763): do_action_ref_array('wp', Array)
    #9 /home/ayzulgoj/public_html/wp-includes/functions.php(1291): WP->main('')
    #10 /home/ayzulgoj/public_html/wp-blog-header.php(16): wp()
    #11 /home/ayzulgoj/public_html/index.php(17): require('/home/ayzulgoj/...')
    #12 {main}
    thrown in /home/ayzulgoj/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-redirector.php on line 401

    How can i solve it?

    Thanks a million

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for bringing this to our attention and apologies for the inconvenience caused.

    Based on the error message provided, it appears that the issue has something to do with the redirection connected to your Rank Math SEO plugin.

    As part of our troubleshooting, let’s check this by first heading over to the Redirection Options inside Rank Math and check the list of all the redirections that have been created.

    Please check if any of the below list is the issue:

    1. Do all the redirections look right?
    2. Can you see if there are any blank redirections?
    3. Is there a redirection where the source and the destination are the same? This can cause infinite loops.
    4. Do the redirects used the correct format?
    5. Are there a lot of redirects to files or weird locations that you don’t recognize? This could be another plugin issue.

    If you found the culprit following the above guide, try to fix them on your end and check if the error is resolved. Most of the time this will help fix the issue but if not, feel free to browse the article on the URL below for more suggested fix:
    https://rankmath.com/kb/solving-redirection-issues-using-rank-math-seo/

    Let us know how it goes and if there is anything you need further assistance with.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘PHP Fatal error in error log’ is closed to new replies.