From a8599667c9d7ec329df7d4e927ff09798b6e3ddd Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Fri, 21 Jul 2023 16:09:43 +0200 Subject: [PATCH] Use is_file() over file_exists() in MD_STD::ensure_file() --- src/MD_STD.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MD_STD.php b/src/MD_STD.php index e41f98e..736fdbe 100644 --- a/src/MD_STD.php +++ b/src/MD_STD.php @@ -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"); }