mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-18 15:39:53 +00:00
Merge pull request #3470 from cuppett/master
Fixes #3469, explicit isset check for counterCache
This commit is contained in:
commit
6f08b064a6
1 changed files with 1 additions and 1 deletions
|
@ -2106,7 +2106,7 @@ class Model extends Object implements CakeEventListener {
|
||||||
protected function _prepareUpdateFields($data) {
|
protected function _prepareUpdateFields($data) {
|
||||||
$foreignKeys = array();
|
$foreignKeys = array();
|
||||||
foreach ($this->belongsTo as $assoc => $info) {
|
foreach ($this->belongsTo as $assoc => $info) {
|
||||||
if ($info['counterCache']) {
|
if (isset($info['counterCache']) && $info['counterCache']) {
|
||||||
$foreignKeys[$assoc] = $info['foreignKey'];
|
$foreignKeys[$assoc] = $info['foreignKey'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue