WordPress.org

Make WordPress Core

Ticket #33068: 33068.patch

File 33068.patch, 466 bytes (added by juliobox, 4 years ago)

! is_null instead of empty()

  • post.php

     
    423423 *                            When $output is OBJECT, a `WP_Post` instance is returned.
    424424 */
    425425function get_post( $post = null, $output = OBJECT, $filter = 'raw' ) {
    426         if ( empty( $post ) && isset( $GLOBALS['post'] ) )
     426        if ( ! is_null( $post ) && isset( $GLOBALS['post'] ) )
    427427                $post = $GLOBALS['post'];