check realpath for false returns

main
Robert 2 years ago
parent adbc870914
commit 39e8a3322f
  1. 8
      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;
}

Loading…
Cancel
Save