Skip to content

Commit

Permalink
Merge pull request #2530 from nextcloud/backport/2524/stable29
Browse files Browse the repository at this point in the history
[stable29] fix: avoid erroring out on corrupt image data
  • Loading branch information
artonge authored Jul 8, 2024
2 parents b2bf80f + 9d07d4f commit 6609545
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Listener/SizeMetadataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ public function handle(Event $event): void {
return;
}

$size = getimagesizefromstring($node->getContent());
$size = @getimagesizefromstring($node->getContent());

if ($size === false) {
$this->logger->debug('SizeMetadataProvider->handle(): Corrupt image data detected ' . $node->getPath());
return;
}

Expand Down

0 comments on commit 6609545

Please sign in to comment.