Configure::__list() fix for undefined variable

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5578 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2007-08-24 17:00:32 +00:00
parent 1326d20792
commit 2e60a4d2f1

View file

@ -150,6 +150,7 @@ class Configure extends Object {
if(!class_exists('folder')) {
uses('folder');
}
$items = array();
$Folder =& new Folder($path);
$contents = $Folder->read(false, true);
if(is_array($contents)) {
@ -158,13 +159,12 @@ class Configure extends Object {
} else {
foreach($contents[1] as $item) {
if (substr($item, -strlen($suffix)) == $suffix) {
$item = substr($item, 0, strlen($item) - strlen($suffix));
$items[] = $item;
$items[] = substr($item, 0, strlen($item) - strlen($suffix));
}
}
return $items;
}
}
return $items;
}
/**
* Used to write a dynamic var in the Configure instance.