diff --git a/src/bootstrap/requires.php b/src/bootstrap/requires.php index 6708772..48749b5 100644 --- a/src/bootstrap/requires.php +++ b/src/bootstrap/requires.php @@ -76,7 +76,13 @@ final class requires { } $dir = str_replace('_DS_', '/', $dir); $dir = self::filter_dir_path($dir); - $dir = escapeshellcmd(realpath($dir)); + + $realpath = realpath($dir); + if ($realpath === false) { + return false; + } + + $dir = escapeshellcmd(realpath($realpath)); return (file_exists($dir)) ? $dir : false; }