mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-30 21:52:59 +00:00
fix for generateList
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4065 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
426bf45f98
commit
ecb2b8c786
1 changed files with 7 additions and 0 deletions
|
@ -1610,6 +1610,10 @@ class Model extends Overloadable {
|
|||
}
|
||||
$result = $this->findAll($conditions, $fields, $order, $limit);
|
||||
$this->recursive = $recursive;
|
||||
|
||||
if(!$result) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($keyPath == null) {
|
||||
$keyPath = '{n}.' . $this->name . '.' . $this->primaryKey;
|
||||
|
@ -1630,6 +1634,9 @@ class Model extends Overloadable {
|
|||
if (!empty($group)) {
|
||||
$c = count($keys);
|
||||
for ($i = 0; $i < $c; $i++) {
|
||||
if(!isset($group[$i])) {
|
||||
$group[$i] = 0;
|
||||
}
|
||||
if (!isset($out[$group[$i]])) {
|
||||
$out[$group[$i]] = array();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue