Make WordPress Core

Changeset 30157


Ignore:
Timestamp:
11/01/2014 08:28:40 PM (10 years ago)
Author:
wonderboymusic
Message:

Check $_current_page before using it in Walker_Page->start_el().

Props jeremyfelt.
Fixes #26901.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post-template.php

    r30105 r30157  
    13061306        if ( ! empty( $current_page ) ) {
    13071307            $_current_page = get_post( $current_page );
    1308             if ( in_array( $page->ID, $_current_page->ancestors ) ) {
     1308            if ( $_current_page && in_array( $page->ID, $_current_page->ancestors ) ) {
    13091309                $css_class[] = 'current_page_ancestor';
    13101310            }
Note: See TracChangeset for help on using the changeset viewer.