Permalink
Browse files

Update definition of an empty model.

  • Loading branch information...
1 parent 8a90cbd commit 940a51b5faa0b88fa5334764c19f93fe8364ef30 @thatcode thatcode committed Oct 25, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Model/Datasource/DboSource.php
@@ -1398,7 +1398,7 @@ protected function _mergeAssociation(&$data, &$merge, $association, $type, $self
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;

0 comments on commit 940a51b

Please sign in to comment.