aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorumgfoin <umgfoin@users.noreply.github.com>2025-03-12 12:22:49 +0100
committerAndy Scherzinger <info@andy-scherzinger.de>2025-03-28 14:44:20 +0100
commit36aa350d9ee9af13c897b735cd78efedd9543ba8 (patch)
treecb675b4761dd67b59d52c04250892f925f3445f3
parent5468a8f1f470aba69014ad67b383d07fede08141 (diff)
downloadnextcloud-server-backport/51433/stable30.tar.gz
nextcloud-server-backport/51433/stable30.zip
fix(GenerateBlurhashMetadata): Suppress imagescale errorsbackport/51433/stable30
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>
-rw-r--r--lib/private/Blurhash/Listener/GenerateBlurhashMetadata.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Blurhash/Listener/GenerateBlurhashMetadata.php b/lib/private/Blurhash/Listener/GenerateBlurhashMetadata.php
index b8ae716ebf9..e633c1645a5 100644
--- a/lib/private/Blurhash/Listener/GenerateBlurhashMetadata.php
+++ b/lib/private/Blurhash/Listener/GenerateBlurhashMetadata.php
@@ -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;
}