• Hello,

    I see that this error was mentioned in a post over a year ago so I thought I’d open a fresh thread since there have been several WP updates since then.

    My site is up to date and has not had any new plugins added recently but in the past few days this error has appeared in the PHP logs as I try to view post categories.

    logs]$ tail php_errors.log
    [31-Oct-2022 16:00:47 UTC] PHP Warning: Attempt to read property "post_type" on null in /xxxx/xxxxxx/xxxx/www.mydomain.com/web/content/wp-includes/class-wp-query.php on line 4365

    I try to view a category (or edit a post sometimes), the attempt times out, and another entry appears in the log.

    What is the significance of line 4365?

    Any suggestions as to a workaround or permanent fix?

    • This topic was modified 3 years, 5 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
Viewing 1 replies (of 1 total)
  • Moderator James Huff

    (@macmanx)

    That file processes all queries, whether they’re from core, plugins, or themes.

    Since this is most likely caused by a plugin or theme conflict, please attempt to deactivate all plugins and switch to the default Twenty Twenty-One theme. If the problem goes away, re-activate them one by one to identify the source of the problem.

Viewing 1 replies (of 1 total)

The topic ‘PHP Warning: Attempt to read property “post_type” on null in’ is closed to new replies.