diff --git a/classes/ImageFilterIterator.php b/classes/ImageFilterIterator.php index fdbd2bf..2518e8c 100644 --- a/classes/ImageFilterIterator.php +++ b/classes/ImageFilterIterator.php @@ -41,7 +41,10 @@ private function isImage() return in_array($type, self::$validTypeConstants, true); } else { $imagesize = getimagesize($filePath); - + if (empty($imagesize)) { + return false; + } + // Index 2 is one of the IMAGETYPE_XXX constants indicating the // type of the image return in_array($imagesize[2], self::$validTypeConstants, true);