WordPress.org

Make WordPress Core

Ticket #33068: patch.diff

File patch.diff, 548 bytes (added by Rahe, 4 years ago)

The original diff file

  • wp-includes/post.php

    diff --git i/wp-includes/post.php w/wp-includes/post.php
    index d0ecd2e..b630f4d 100644
    i w function get_extended( $post ) { 
    419419 *                            When $output is OBJECT, a `WP_Post` instance is returned.
    420420 */
    421421function get_post( $post = null, $output = OBJECT, $filter = 'raw' ) {
    422         if ( empty( $post ) && isset( $GLOBALS['post'] ) )
     422        if ( 0 !== $post && empty( $post ) && isset( $GLOBALS['post'] ) )
    423423                $post = $GLOBALS['post'];
    424424
    425425        if ( $post instanceof WP_Post ) {