diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index 0d9fa442035..0ef76a10132 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -1474,15 +1474,16 @@ public function image_create_gd($path = '', $image_type = '') $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;