mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
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:
parent
1326d20792
commit
2e60a4d2f1
1 changed files with 3 additions and 3 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue