Media: Avoid a PHP warning in wp_generate_attachment_metadata() if $metadata is not an array.

This was previously fixed in [25968], but accidentally reverted in [32545].

Props skithund.
Fixes #34599.
Built from https://develop.svn.wordpress.org/trunk@35554


git-svn-id: http://core.svn.wordpress.org/trunk@35518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2015-11-06 09:25:26 +00:00
parent b9d9c6d3c9
commit 7ad65267b6
2 changed files with 4 additions and 2 deletions

View File

@ -194,7 +194,9 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) {
}
// Remove the blob of binary data from the array.
unset( $metadata['image']['data'] );
if ( $metadata ) {
unset( $metadata['image']['data'] );
}
/**
* Filter the generated attachment meta data.

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-beta3-35553';
$wp_version = '4.4-beta3-35554';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.