[wp-trac] [WordPress Trac] #30136: Array Check in post-template.php start_el function

WordPress Trac noreply at wordpress.org
Tue Oct 28 17:16:21 UTC 2014


#30136: Array Check in post-template.php start_el function
--------------------------+-----------------------------
 Reporter:  tripgrass     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.0
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 I am receiving error "Warning: in_array() expects parameter 2 to be array,
 null given in /nas/wp/www/cluster-1790/trbf/wp-includes/post-template.php
 on line 1299"

 Line 1299 :
 {{{
 if ( in_array( $page->ID, $_current_page->ancestors ) ) {
 }}}

 $current_page can be set on line 1062 of post-template.php as an Integer
 Seems like line 1299 should check if $_current_page->ancestors exists and
 is_array

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30136>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list