Make WordPress Core

Changeset 43592


Ignore:
Timestamp:
08/30/2018 09:00:42 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Post Formats: Don't assign a variable inside if statement in get_post_format().

Props Mirucon.
Fixes #44840.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post-formats.php

    r42343 r43592  
    1616 */
    1717function get_post_format( $post = null ) {
    18     if ( ! $post = get_post( $post ) ) {
     18    $post = get_post( $post );
     19
     20    if ( ! $post ) {
    1921        return false;
    2022    }
     
    6870    $post = get_post( $post );
    6971
    70     if ( empty( $post ) ) {
     72    if ( ! $post ) {
    7173        return new WP_Error( 'invalid_post', __( 'Invalid post.' ) );
    7274    }
Note: See TracChangeset for help on using the changeset viewer.