From 9d07d4f05a19cae5fb803b8597926fcb026b340c Mon Sep 17 00:00:00 2001 From: Josh Richards Date: Sat, 6 Jul 2024 17:17:50 -0400 Subject: [PATCH] fix: avoid erroring out on corrupt image data Signed-off-by: Josh Richards --- lib/Listener/SizeMetadataProvider.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Listener/SizeMetadataProvider.php b/lib/Listener/SizeMetadataProvider.php index 4ce629813..7f1e8d2db 100644 --- a/lib/Listener/SizeMetadataProvider.php +++ b/lib/Listener/SizeMetadataProvider.php @@ -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; }