Commit 05926870 authored by Nigel McNie's avatar Nigel McNie

Prevent exif_imagetype producing read errors when the file is... "small".

See for
all the "frivolaties".
Signed-off-by: default avatarNigel McNie <>
parent 20ab9122
......@@ -360,7 +360,9 @@ function is_image_type($type) {
function is_image_file($path) {
if (function_exists('exif_imagetype')) {
// exif_imagetype is faster
if (!$type = exif_imagetype($path)) {
// surpressing errors because exif_imagetype spews "read error!" to the logs on small files
if (!$type = @exif_imagetype($path)) {
return false;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment