WordPress.org

Make WordPress Core

Changeset 23867


Ignore:
Timestamp:
03/29/2013 04:37:46 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Make sure the autosave post exists before getting its meta. props kovshenin. fixes #23539.

File:
1 edited

Legend:

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

    r23866 r23867  
    536536
    537537    $preview = wp_get_post_autosave( $post->ID );
     538    if ( ! is_object( $preview ) )
     539        return $value;
     540
    538541    return get_post_meta( $preview->ID, $meta_key, $single );
    539542}
Note: See TracChangeset for help on using the changeset viewer.