WordPress.org

Make WordPress Core

Ticket #19366: 19366.patch

File 19366.patch, 519 bytes (added by SergeyBiryukov, 6 years ago)
  • wp-includes/query.php

     
    26832683                                }
    26842684                        }
    26852685
    2686                         if ( $this->is_preview && current_user_can( $edit_cap, $this->posts[0]->ID ) )
     2686                        if ( $this->is_preview && !empty( $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                }
    26892689