mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
"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:
parent
57a61f8f82
commit
a2db4e69b3
1 changed files with 5 additions and 0 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue