WordPress.org

Plugin Directory

Changeset 812482


Ignore:
Timestamp:
11/29/13 15:34:11 (5 months ago)
Author:
donncha
Message:

Check that $post is an object as this function is used for more than just post changes. http://wordpress.org/support/topic/error-switching-themes?replies=2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-super-cache/trunk/wp-cache-phase2.php

    r792003 r812482  
    10981098    // Some users are inexplicibly seeing this error on scheduled posts.  
    10991099    // define this constant to disable the post status check. 
    1100     if ( false == defined( 'WPSCFORCEUPDATE' ) && $post->post_status != 'publish' ) { 
     1100    if ( false == defined( 'WPSCFORCEUPDATE' ) && is_object( $post ) && $post->post_status != 'publish' ) { 
    11011101        if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "wp_cache_post_change: draft post, not deleting any cache files.", 4 ); 
    11021102        return $post_id; 
Note: See TracChangeset for help on using the changeset viewer.