"Correcting Configure::listObjects()"

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6060 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-11-23 01:17:25 +00:00
parent d8126757bd
commit b7b9bb1d55

View file

@ -150,7 +150,8 @@ class Configure extends Object {
$search = array_merge(array(APP), $_this->corePaths($type)); $search = array_merge(array(APP), $_this->corePaths($type));
foreach ($search as $delete) { foreach ($search as $delete) {
if (in_array($delete, $path)) {
if (is_array($path) && in_array($delete, $path)) {
$remove = array_flip($path); $remove = array_flip($path);
unset($remove[$delete]); unset($remove[$delete]);
$path = array_flip($remove); $path = array_flip($remove);
@ -446,6 +447,7 @@ class Configure extends Object {
} }
if (is_dir($path . DS . 'cake')) { if (is_dir($path . DS . 'cake')) {
$paths['cake'][] = $path . DS . 'cake'; $paths['cake'][] = $path . DS . 'cake';
$paths['class'][] = $path . DS . 'cake';
} }
} }
Cache::write('core_paths', array_filter($paths), '_cake_core_'); Cache::write('core_paths', array_filter($paths), '_cake_core_');