mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(GenerateBlurhashMetadata): Suppress imagescale errors
Suppress errors in imagescale during file-scans: Most of these errors are caused by out of range x/y-dims. Triggering un unhandled exception, metadata-generation aborts at this point (e.g. occ files:scan --generate-metadata), effectively preventing these images from being added to photos or maps. This problem might be the root cause for an issue described here: https://github.com/nextcloud/photos/issues/2768 Signed-off-by: umgfoin <umgfoin@users.noreply.github.com>
This commit is contained in:
parent
cebff0b389
commit
b3b2c68937
1 changed files with 1 additions and 1 deletions
|
|
@ -98,7 +98,7 @@ class GenerateBlurhashMetadata implements IEventListener {
|
|||
$newX = intval($currX * $newY / $currY);
|
||||
}
|
||||
|
||||
$newImage = imagescale($image, $newX, $newY);
|
||||
$newImage = @imagescale($image, $newX, $newY);
|
||||
return ($newImage !== false) ? $newImage : $image;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue