From 5abd2ae8c7fb30585dae2bf96ffa847771ebad7f Mon Sep 17 00:00:00 2001 From: Diego Date: Thu, 2 Apr 2020 12:51:32 +0200 Subject: Fixed issue with creating a resource from png using Image_lib --- system/libraries/Image_lib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'system/libraries/Image_lib.php') diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index 0d9fa4420..0ef76a101 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -1474,15 +1474,16 @@ class CI_Image_lib { $this->set_error(array('imglib_unsupported_imagecreate', 'imglib_png_not_supported')); return FALSE; } + + return imagecreatefrompng($path); case 18: if ( ! function_exists('imagecreatefromwebp')) { $this->set_error(array('imglib_unsupported_imagecreate', 'imglib_webp_not_supported')); return FALSE; } - return imagecreatefromwebp($path); - return imagecreatefrompng($path); + return imagecreatefromwebp($path); default: $this->set_error(array('imglib_unsupported_imagecreate')); return FALSE; -- cgit v1.2.3-24-g4f1b