Fix notice when viewing a post preview logged out. props SergeyBiryukov, fixes #19366.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e7a3480e61
commit
3dc9933800
|
@ -2683,7 +2683,7 @@ class WP_Query {
|
|||
}
|
||||
}
|
||||
|
||||
if ( $this->is_preview && current_user_can( $edit_cap, $this->posts[0]->ID ) )
|
||||
if ( $this->is_preview && $this->posts && current_user_can( $edit_cap, $this->posts[0]->ID ) )
|
||||
$this->posts[0] = apply_filters_ref_array('the_preview', array( $this->posts[0], &$this ));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue