Use is_file() over file_exists() in MD_STD::ensure_file()

This commit is contained in:
Joshua Ramon Enslin 2023-07-21 16:09:43 +02:00
parent bb36388e7e
commit a8599667c9
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE

View File

@ -704,7 +704,7 @@ final class MD_STD {
*/
public static function ensure_file(string $filepath, array $accepted_mimetype = []):void {
if (!\file_exists($filepath)) {
if (!\is_file($filepath)) {
throw new MDFileDoesNotExist("File " . basename($filepath) . " does not exist");
}