Browse Source

Fixes #3469, explicit isset check for counterCache

Stephen Cuppett 12 years ago
parent
commit
ed83df5bed
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/Cake/Model/Model.php

+ 1 - 1
lib/Cake/Model/Model.php

@@ -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'];
 			}
 		}