From 22fb8b3b3cde2b7dc06718637c354a4bc3838c43 Mon Sep 17 00:00:00 2001 From: Shish Date: Mon, 30 Jan 2023 23:41:41 +0000 Subject: [PATCH] only set source if needed --- ext/image/main.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/image/main.php b/ext/image/main.php index a73be90c..8709ddf7 100644 --- a/ext/image/main.php +++ b/ext/image/main.php @@ -183,7 +183,9 @@ class ImageIO extends Extension $tags_to_set = $image->get_tag_array(); $image->tag_array = []; send_event(new TagSetEvent($image, $tags_to_set)); - send_event(new SourceSetEvent($image, $image->source)); + if ($image->source) { + send_event(new SourceSetEvent($image, $image->source)); + } } catch (ImageAdditionException $e) { throw new UploadException($e->error); }