WordPress.org

Make WordPress Core

Changeset 25968


Ignore:
Timestamp:
10/28/2013 04:42:36 PM (8 years ago)
Author:
SergeyBiryukov
Message:

Avoid a PHP warning in wp_generate_attachment_metadata() if $metadata is not an array. props asakurayoh. fixes #25649.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/image.php

    r23766 r25968  
    151151        }
    152152    }
     153
    153154    // remove the blob of binary data from the array
    154     unset( $metadata['image']['data'] );
     155    if ( isset( $metadata['image']['data'] ) )
     156        unset( $metadata['image']['data'] );
    155157
    156158    return apply_filters( 'wp_generate_attachment_metadata', $metadata, $attachment_id );
Note: See TracChangeset for help on using the changeset viewer.