"Fixes #4305, Configure::corePaths() causes PHP safe_mode errors"

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6553 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2008-03-10 11:01:37 +00:00
parent 57a61f8f82
commit a2db4e69b3

View file

@ -462,6 +462,11 @@ class Configure extends Object {
$all = array_flip(array_flip((array_merge(array(CAKE_CORE_INCLUDE_PATH), $all))));
$used = array();
$openBasedir = ini_get('open_basedir');
if ($openBasedir) {
$all = explode(PATH_SEPARATOR, $openBasedir);
}
foreach ($all as $path) {
$path = rtrim($path, DS);
if ($path == '.' || in_array(realpath($path), $used)) {