• Hello,
    I enabled the debug log and noticed this error in it.
    do i need to fix it?

    Trying to get property 'post_type' of non-object in /home/.../.../wp-includes/class-wp-query.php on line 4179

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    In my opinion this issue is causing by one of you plugins. Please deactivate them one by one and to figure out which one is causing the issue.
    (degrade to the stable PHP version if you just updated yours).

    Tell me if that doesn’t work.

    Thank You.

    Thread Starter iobaid

    (@iobaid)

    Thanks for your reply. I did as you said, and the error still showing in the debug log.
    I went to the mentioned file and the error was generating within this line.

    public function is_singular( $post_types = '' ) {
    		if ( empty( $post_types ) || ! $this->is_singular ) {
    			return (bool) $this->is_singular;
    		}
    
    		$post_obj = $this->get_queried_object();
    
    		return in_array( $post_obj->post_type, (array) $post_types, true );
    	}
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘class-wp-query.php on line 4179’ is closed to new replies.