From 00a49f6541bd53fe2dd2c55228f0c90f59e8a022 Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 30 Dec 2023 13:02:31 +0000 Subject: [PATCH] [media] set $size to "unknown" if we don't know the size --- ext/media/main.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/media/main.php b/ext/media/main.php index a5b29eb6..69c4d306 100644 --- a/ext/media/main.php +++ b/ext/media/main.php @@ -277,6 +277,8 @@ class Media extends Extension } elseif ($event->image->length) { $s = ((int)($event->image->length / 100)) / 10; $event->replace('$size', "{$s}s"); + } else { + $event->replace('$size', "unknown size"); } }