Added image_id null check to resize's data upload event, to prevent an error when merging is enabled

This commit is contained in:
Matthew Barbour 2019-06-15 10:02:08 -05:00 committed by matthew
parent 6f501a6e74
commit e940d87c22

View File

@ -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")) {