Ticket #21309: 21309-global.diff

File 21309-global.diff, 480 bytes (added by mdawaffe, 9 months ago)
  • wp-includes/post.php

     
    381381        $null = null; 
    382382 
    383383        if ( empty( $post ) && isset( $GLOBALS['post'] ) ) { 
     384                if ( !is_a( $GLOBALS['post'], 'WP_Post' ) ) { 
     385                        return get_post( $GLOBALS['post'], $output, $filter ); 
     386                } 
     387 
    384388                $_post = & $GLOBALS['post']; 
    385389        } elseif ( is_a( $post, 'WP_Post' ) ) { 
    386390                $_post = $post;