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. git-svn-id: https://develop.svn.wordpress.org/trunk@35554 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
22135794a2
commit
5e614a08f8
@ -194,7 +194,9 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) {
|
||||
}
|
||||
|
||||
// Remove the blob of binary data from the array.
|
||||
if ( $metadata ) {
|
||||
unset( $metadata['image']['data'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the generated attachment meta data.
|
||||
|
Loading…
Reference in New Issue
Block a user