mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 00:48:25 +00:00
"Closes #4305, fixed to allow cake core outside of normal install locations"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6555 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
57918f4199
commit
9ae17c25e5
1 changed files with 5 additions and 3 deletions
|
@ -458,13 +458,15 @@ class Configure extends Object {
|
|||
function corePaths($type = null) {
|
||||
$paths = Cache::read('core_paths', '_cake_core_');
|
||||
if (!$paths) {
|
||||
$all = explode(PATH_SEPARATOR, ini_get('include_path'));
|
||||
$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);
|
||||
$all = array_flip(array_flip((array_merge(array(CAKE_CORE_INCLUDE_PATH), $all))));
|
||||
} else {
|
||||
$all = explode(PATH_SEPARATOR, ini_get('include_path'));
|
||||
$all = array_flip(array_flip((array_merge(array(CAKE_CORE_INCLUDE_PATH), $all))));
|
||||
}
|
||||
|
||||
foreach ($all as $path) {
|
||||
|
|
Loading…
Add table
Reference in a new issue