WordPress.org

Make WordPress Core

Changeset 23351


Ignore:
Timestamp:
01/28/13 02:55:06 (15 months ago)
Author:
SergeyBiryukov
Message:

Make sure the post exists before checking its ID. fixes #23026.

File:
1 edited

Legend:

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

    r22948 r23351  
    681681        foreach ( $items as $item ) { 
    682682            // A page cannot be its own parent. 
    683             if ( $post->ID && $item->ID == $post->ID ) 
     683            if ( $post && $post->ID && $item->ID == $post->ID ) 
    684684                continue; 
    685685 
Note: See TracChangeset for help on using the changeset viewer.