Make WordPress Core

Changeset 19604


Ignore:
Timestamp:
12/20/2011 08:46:06 PM (13 years ago)
Author:
nacin
Message:

Fix notice when viewing a post preview logged out. props SergeyBiryukov, fixes #19366.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r19593 r19604  
    26842684            }
    26852685
    2686             if ( $this->is_preview && current_user_can( $edit_cap, $this->posts[0]->ID ) )
     2686            if ( $this->is_preview && $this->posts && current_user_can( $edit_cap, $this->posts[0]->ID ) )
    26872687                $this->posts[0] = apply_filters_ref_array('the_preview', array( $this->posts[0], &$this ));
    26882688        }
Note: See TracChangeset for help on using the changeset viewer.