diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2020-04-29 01:28:38 +0200 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2020-04-29 01:28:38 +0200 |
commit | 35e428c077dac7e57e6f6833562c88ae4a9867da (patch) | |
tree | ff4dae3dbd993ccf9e7af2807e007a8943ee8062 /app/fn/fn.php | |
parent | 1e6eb30dbb3cb546f30650edd6c1db43167fdb53 (diff) | |
download | wcms-35e428c077dac7e57e6f6833562c88ae4a9867da.tar.gz wcms-35e428c077dac7e57e6f6833562c88ae4a9867da.zip |
feature : rename media fix #82
Diffstat (limited to 'app/fn/fn.php')
-rw-r--r-- | app/fn/fn.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/fn/fn.php b/app/fn/fn.php index 103062a..461f129 100644 --- a/app/fn/fn.php +++ b/app/fn/fn.php @@ -425,6 +425,9 @@ function accessfile(string $path, bool $createdir = false): bool if (!is_writable($dir)) { throw new \InvalidArgumentException("Directory '$dir' is not writable."); } + if (!file_exists($path)) { + throw new \InvalidArgumentException("The file '$path' does not exist."); + } if (is_file($path) && !is_writable($path)) { throw new \InvalidArgumentException("The file '$path' is not writable."); } |