diff --git a/img/error.png b/img/error.png new file mode 100644 index 0000000..f4884c9 Binary files /dev/null and b/img/error.png differ diff --git a/lib/thumbs.class.php b/lib/thumbs.class.php index 0de9890..0245c40 100644 --- a/lib/thumbs.class.php +++ b/lib/thumbs.class.php @@ -45,6 +45,11 @@ class thumb { if (!file_exists($dstpath)) { $type = exif_imagetype($src); + if ($type == 0) { + error_log("$src: Unknown Image Type"); + return "img/error.png"; + } + $image = call_user_func(self::IMAGE_HANDLERS[$type]['load'], $src); $srcwidth = imagesx($image);