Fixes #3469, explicit isset check for counterCache

This commit is contained in:
Stephen Cuppett 2014-05-11 19:17:18 -04:00
parent cc49d28ef8
commit ed83df5bed

View file

@ -2106,7 +2106,7 @@ class Model extends Object implements CakeEventListener {
protected function _prepareUpdateFields($data) {
$foreignKeys = array();
foreach ($this->belongsTo as $assoc => $info) {
if ($info['counterCache']) {
if (isset($info['counterCache']) && $info['counterCache']) {
$foreignKeys[$assoc] = $info['foreignKey'];
}
}