My error log is filled with this: PHP Notice: Trying to get property of non-object in /home/.../wp-includes/query.php on line 4654
Line 4654 is as follows: return in_array( $post_obj->post_type, (array) $post_types );
How can I diagnose what exactly is causing this? I assume some code elsewhere is accessing query.php and causes this error but I don't see any hint other than the one above.
Please do not just say "ignore it, it's nothing", I do my best to keep my site error-free so I'd really like to find out what this is and fix it.
Thanks in advance