@ -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;