Check for _error in getting metadata array in PNGHandler
Before I039785d5b6, it would just suppress errors and return empty value in which shorten out. Now, it returns [ '_error' => some value ] which is not empty value but doesn't have anything this method wants either. Bug: T285431 Change-Id: Ia2bc0982ffaeda0575af1481f9b84faad7d784ad
This commit is contained in:
parent
0ecbc373cd
commit
cafb14dffb
1 changed files with 5 additions and 1 deletions
|
|
@ -150,7 +150,11 @@ class PNGHandler extends BitmapHandler {
|
|||
|
||||
$metadata = $image->getMetadataArray();
|
||||
|
||||
if ( !$metadata || $metadata['frameCount'] <= 0 ) {
|
||||
if (
|
||||
!$metadata ||
|
||||
( isset( $metadata['_error'] ) && $metadata['_error'] ) ||
|
||||
$metadata['frameCount'] <= 0
|
||||
) {
|
||||
return $original;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue