WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#8453 closed defect (bug) (fixed)

fixing notice in wp-includes/classes.php

Reported by: Malaiac Owned by:
Milestone: 2.7 Priority: normal
Severity: minor Version: 2.7
Component: General Keywords: has-patch
Focuses: Cc:

Description

if ( in_array($page->ID, (array) $_current_page->ancestors) )

$_current_page->ancestors is not always set, leading to PHP notices

fix :

if ( isset($_current_page->ancestors) && in_array($page->ID, (array) $_current_page->ancestors) )

Attachments (1)

wp-includes.diff (636 bytes) - added by Malaiac 6 years ago.

Download all attachments as: .zip

Change History (2)

@Malaiac6 years ago

comment:1 @ryan6 years ago

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

(In [10013]) Notice fix from Malaiac. fixes #8453

Note: See TracTickets for help on using tickets.