I am using customized theme for my development. The site was working fine and in last few days started seeing this error
Fatal error: Call to a member function is_singular() on a non-object in /home/content/29/11116929/html/studyus/wp-includes/comment.php on line 2399
The error is on line 2399 which is
if ( empty( $posts ) || ! $query->is_singular() || ! get_option( 'close_comments_for_old_posts' ) ) return $posts;
comments.php is wordpress file and we have not changed anything. This is what I have done so far a) upgraded to latest version 3.9.1 b) disabled all plugins c) checked comments.php in my theme's file, reverted to base version and still same issues.