[wp-trac] [WordPress Trac] #29660: Functions in wp_includes/query.php assume non-null return value from get_queried_object

WordPress Trac noreply at wordpress.org
Mon Aug 2 07:39:24 UTC 2021


#29660: Functions in wp_includes/query.php assume non-null return value from
get_queried_object
-------------------------------------------------+-------------------------
 Reporter:  yellyc                               |       Owner:
                                                 |  SergeyBiryukov
     Type:  defect (bug)                         |      Status:  reviewing
 Priority:  normal                               |   Milestone:  5.9
Component:  Query                                |     Version:  4.0
 Severity:  normal                               |  Resolution:
 Keywords:  2nd-opinion has-patch has-unit-      |     Focuses:
  tests                                          |
-------------------------------------------------+-------------------------

Comment (by kanlukasz):

 I have same issue with PHP 8 and latest WP version:


 {{{
 PHP Warning:  Attempt to read property "post_type" on null in
 /xxxx/xxxx/xxxxx/xxxx/wp-includes/class-wp-query.php on line 4196
 PHP Warning:  Attempt to read property "post_type" on null in
 /xxxx/xxxx/xxxxx/xxxx/wp-includes/class-wp-query.php on line 4196
 PHP Warning:  Attempt to read property "post_type" on null in
 /xxxx/xxxx/xxxxx/xxxx/wp-includes/class-wp-query.php on line 4196
 PHP Warning:  Attempt to read property "post_type" on null in
 /xxxx/xxxx/xxxxx/xxxx/wp-includes/class-wp-query.php on line 4196
 PHP Warning:  Attempt to read property "post_type" on null in
 /xxxx/xxxx/xxxxx/xxxx/wp-includes/class-wp-query.php on line 4196
 PHP Warning:  Attempt to read property "post_type" on null in
 /xxxx/xxxx/xxxxx/xxxx/wp-includes/class-wp-query.php on line 4196
 PHP Warning:  Attempt to read property "post_type" on null in
 /xxxx/xxxx/xxxxx/xxxx/wp-includes/class-wp-query.php on line 4196
 PHP Warning:  Attempt to read property "post_type" on null in
 /xxxx/xxxx/xxxxx/xxxx/wp-includes/class-wp-query.php on line 4196
 PHP Warning:  Attempt to read property "post_type" on null in
 /xxxx/xxxx/xxxxx/xxxx/wp-includes/class-wp-query.php on line 4196
 PHP Warning:  Attempt to read property "post_type" on null in
 /xxxx/xxxx/xxxxx/xxxx/wp-includes/class-wp-query.php on line 4196
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/29660#comment:44>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list