Skip to content

Commit 76fc3e0

Browse files
authored
Merge pull request #44716 from nextcloud/backport/44705/stable29
2 parents b305033 + fc1a83f commit 76fc3e0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/private/Blurhash/Listener/GenerateBlurhashMetadata.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function handle(Event $event): void {
8888
try {
8989
// using preview image to generate the blurhash
9090
$preview = $this->preview->getPreview($file, 256, 256);
91-
$image = imagecreatefromstring($preview->getContent());
91+
$image = @imagecreatefromstring($preview->getContent());
9292
} catch (NotFoundException $e) {
9393
// https://github.com/nextcloud/server/blob/9d70fd3e64b60a316a03fb2b237891380c310c58/lib/private/legacy/OC_Image.php#L668
9494
// The preview system can fail on huge picture, in that case we use our own image resizer.
@@ -114,7 +114,7 @@ public function handle(Event $event): void {
114114
* @throws LockedException
115115
*/
116116
private function resizedImageFromFile(File $file): GdImage|false {
117-
$image = imagecreatefromstring($file->getContent());
117+
$image = @imagecreatefromstring($file->getContent());
118118
if ($image === false) {
119119
return false;
120120
}

0 commit comments

Comments
 (0)