Support » Fixing WordPress » PHP Notice Trying to get property of non-object in class-wp-query.php

  • I am trying to troubleshoot a PHP Notice that originates in a WP core file on one of my WP websites. I am using WP v 5.1.1

    [09-Mar-2019 04:53:33 UTC] PHP Notice:  Trying to get property of non-object in /wp-includes/class-wp-query.php on line 3669
    [09-Mar-2019 04:53:33 UTC] PHP Notice:  Trying to get property of non-object in /wp-includes/class-wp-query.php on line 3671
    [09-Mar-2019 04:53:33 UTC] PHP Notice:  Trying to get property of non-object in /wp-includes/class-wp-query.php on line 3673

    This is from the is_category function.

    The code in question:
    $cat_obj = $this->get_queried_object();

    The $cat_obj is apparently not an object when these Notices are produced.

    Is there something on my end that I can do to fix this or is this a WP wide bug?

Viewing 1 replies (of 1 total)
  • Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    This may be a plugin or theme conflict. Please attempt to disable all plugins, and switch to the default Twenty Nineteen theme. If the problem goes away, enable them one by one to identify the source of the problem.

    If you can install plugins, install Health Check. On the troubleshooting tab, you can click the button to disable all plugins and change the theme for you, while you’re still logged in, without affecting normal visitors to your site.

Viewing 1 replies (of 1 total)
  • The topic ‘PHP Notice Trying to get property of non-object in class-wp-query.php’ is closed to new replies.