Merge pull request #4457 from KN4CK3R/develop

Fix CI_Image_lib::get_image_properties() invalid image handling
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php
index 3e45cb8..9eb05c2 100644
--- a/system/libraries/Image_lib.php
+++ b/system/libraries/Image_lib.php
@@ -1639,6 +1639,11 @@
 		}
 
 		$vals = getimagesize($path);
+		if ($vals === FALSE)
+		{
+			$this->set_error('imglib_invalid_image');
+			return FALSE;
+		}
 		$types = array(1 => 'gif', 2 => 'jpeg', 3 => 'png');
 		$mime = (isset($types[$vals[2]])) ? 'image/'.$types[$vals[2]] : 'image/jpg';