Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#30136 closed defect (bug) (duplicate)

Array Check in post-template.php start_el function

Reported by: tripgrass's profile tripgrass Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.0
Component: Posts, Post Types Keywords:
Focuses: template Cc:

Description

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

Change History (2)

#1 @5um17
10 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #26901.

It has been fixed.

#2 @SergeyBiryukov
10 years ago

  • Component changed from General to Posts, Post Types
  • Focuses template added
  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.