mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Adding fix for undefined index
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4827 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
00be91c954
commit
dcf64033ed
1 changed files with 6 additions and 4 deletions
|
@ -803,7 +803,7 @@ class DboSource extends DataSource {
|
|||
$merged[$association] = array();
|
||||
$count = 0;
|
||||
foreach ($merge as $assoc => $data) {
|
||||
if($value[$model->name][$model->primaryKey] === $data[$association][$model->hasMany[$association]['foreignKey']]) {
|
||||
if(isset($value[$model->name]) && $value[$model->name][$model->primaryKey] === $data[$association][$model->hasMany[$association]['foreignKey']]) {
|
||||
if(count($data) > 1) {
|
||||
$temp[] = Set::pushDiff($data[$association], $data);
|
||||
unset($temp[$count][$association]);
|
||||
|
@ -814,11 +814,13 @@ class DboSource extends DataSource {
|
|||
}
|
||||
$count++;
|
||||
}
|
||||
if(isset($value[$model->name])){
|
||||
$resultSet[$key] = Set::pushDiff($resultSet[$key], $merged);
|
||||
unset($merged);
|
||||
unset($temp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Enter description here...
|
||||
|
|
Loading…
Add table
Reference in a new issue