Make WordPress Core

Ticket #55400: 55400.diff

File 55400.diff, 464 bytes (added by azouamauriac, 5 years ago)
  • src/wp-includes/class-wp-query.php

     
    42914291
    42924292                $post_obj = $this->get_queried_object();
    42934293
    4294                 return in_array( $post_obj->post_type, (array) $post_types, true );
     4294                return $post_obj ? in_array( $post_obj->post_type, (array) $post_types, true ) : false;
    42954295        }
    42964296
    42974297        /**