• Resolved swerlz

    (@swerlz)


    Hi,

    I’ve been spammed within me debug.log with:

    `PHP Notice: Trying to get property ‘ID’ of non-object in /public_html/wp-includes/class-wp-query.php on line 4044
    PHP Notice: Trying to get property ‘post_title’ of non-object in /public_html/wp-includes/class-wp-query.php on line 4046
    PHP Notice: Trying to get property ‘post_name’ of non-object in /public_html/wp-includes/class-wp-query.php on line 4048
    PHP Notice: Trying to get property ‘post_type’ of non-object in /public_html/wp-includes/class-wp-query.php on line 4196

    Is there an fix to stop this from spamming? I just want my debug log looking cleaner. Thanks

    • This topic was modified 4 years, 12 months ago by swerlz.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @swerlz,

    Really the only way to do that would be to start from the log and then work backward to find what’s triggering this. Then update the code there so it doesn’t trigger this warning.

    You may be able to use timestamps in the log to connect the log to actions on the site as a starting point.

    Another option would be to disable all plugins and switch to a default theme and see if you keep getting this notice. If it doesn’t happen, then switch back to your theme and try again. Continue testing by activating plugins, one by one, until the message returns. The last one activated is likely connected to the notice.

    Let us know what you find out.

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Since it’s been a while since we last heard back from you, I’m going to mark this thread resolved.

    Hopefully, you were able to find a solution to your problem! If you have further questions, please feel free to open a new topic.

    Cheers! 🙂

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

The topic ‘class-wp-query Notice’ is closed to new replies.