mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-01 21:21:24 +01:00
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:
parent
b9d9c6d3c9
commit
7ad65267b6
@ -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.
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user