Fix undefined values and other warnings

This commit is contained in:
Kijin Sung 2025-06-01 18:45:46 +09:00
parent 702eebaa92
commit eba7b75c3a
7 changed files with 73 additions and 37 deletions

View file

@ -15,7 +15,7 @@ class Image
*/
public static function isImage(string $filename): bool
{
return array_shift(explode('/', MIME::getContentType($filename))) === 'image';
return preg_match('!^image/!', MIME::getContentType($filename));
}
/**