Slight coding problem produces massive WP debug log spew
-
Notices produced take the form…
PHP Notice: Trying to get property ‘post_type’ of non-object in /sites/…/wordpress/demo/wp-includes/class-wp-query.php on line 4094
Problem seems to relate to the wp-fastest-cache/inc/cache.php file line #62.
Changing this line to…
}else if(is_object($post) && is_singular(‘post’)){
Fixes the notice… and… looking at the entire detect_current_page_type() function likely requires revisiting… to test for an object at top of function, then take action based on whether $post is an object or not.
Be great if some fix could be rolled into this function to silence the 1000s of lines spewing every hour into the debug log… for high traffic sites…
Thanks!
The topic ‘Slight coding problem produces massive WP debug log spew’ is closed to new replies.