Better Handling for Broken Image Files
This commit is contained in:
parent
933942045f
commit
d54027beeb
1 changed files with 5 additions and 0 deletions
|
@ -54,6 +54,11 @@ class thumb {
|
|||
|
||||
$image = call_user_func(self::IMAGE_HANDLERS[$type]['load'], $src);
|
||||
|
||||
if ($image == false) {
|
||||
error_log("$src: Image Loading Failed");
|
||||
return "img/error.png";
|
||||
}
|
||||
|
||||
$srcwidth = imagesx($image);
|
||||
$srcheight = imagesy($image);
|
||||
|
||||
|
|
Loading…
Reference in a new issue