Use is_file() over file_exists() in MD_STD::ensure_file()
This commit is contained in:
parent
bb36388e7e
commit
a8599667c9
|
@ -704,7 +704,7 @@ final class MD_STD {
|
||||||
*/
|
*/
|
||||||
public static function ensure_file(string $filepath, array $accepted_mimetype = []):void {
|
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");
|
throw new MDFileDoesNotExist("File " . basename($filepath) . " does not exist");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user