Browse Source

Update definition of an empty model.

Robert Sworder 12 years ago
parent
commit
940a51b5fa
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/Cake/Model/Datasource/DboSource.php

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

@@ -1398,7 +1398,7 @@ class DboSource extends DataSource {
 			if (isset($merge[$association])) {
 				$data[$association] = $merge[$association][0];
 			} else {
-				if (count($merge[0][$association]) > 1) {
+				if (!empty($merge[0][$association])) {
 					foreach ($merge[0] as $assoc => $data2) {
 						if ($assoc !== $association) {
 							$merge[0][$association][$assoc] = $data2;