Better error handling

This commit is contained in:
eldadfux
2019-11-13 00:39:07 +02:00
parent fdcbb86f43
commit 8db0b3acf6
+1 -1
View File
@@ -43,7 +43,7 @@ $avatarCallback = function ($type, $code, $width, $height, $quality) use ($types
$path = $types[$type][$code];
$type = 'png';
if (!file_exists($path)) {
if (!is_readable($path)) {
throw new Exception('File not found in '.$path, 404);
}