try {
$target = mkthumb($imgpath, $width, $height);
}
-catch (Exception $e) {
+catch (Throwable $e) {
http_response_code($e->getCode() ?: 500);
$target = '500.png';
if (file_exists($target)) {
$backend = $_GET['backend'];
}
elseif (file_exists($target)) {
- return;
+ return $target;
}
elseif (extension_loaded('gd')) {
$backend = 'gd';