From e940d87c229daab775dfc7ad4876d91c54319c67 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Sat, 15 Jun 2019 10:02:08 -0500 Subject: [PATCH] Added image_id null check to resize's data upload event, to prevent an error when merging is enabled --- ext/resize/main.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/resize/main.php b/ext/resize/main.php index 41eabde0..35fd537f 100644 --- a/ext/resize/main.php +++ b/ext/resize/main.php @@ -62,6 +62,10 @@ class ResizeImage extends Extension { global $config, $page; + if($event->image_id==null) { + return; + } + $image_obj = Image::by_id($event->image_id); if ($config->get_bool("resize_upload") == true && ($image_obj->ext == "jpg" || $image_obj->ext == "png" || $image_obj->ext == "gif" || $image_obj->ext == "webp")) {