Skip to content

Commit

Permalink
Merge pull request #2529 from nextcloud/backport/2524/stable28
Browse files Browse the repository at this point in the history
[stable28] fix: avoid erroring out on corrupt image data
  • Loading branch information
artonge authored Jul 8, 2024
2 parents 1828dea + c2cb7cc commit bf9be97
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 bf9be97

Please sign in to comment.