Use + instead of array_merge.

If you have numeric columns in your database, array_merge() will re-key
the array dropping the original values.

Fixes #2198
This commit is contained in:
mark_story 2013-10-25 10:23:50 -04:00
parent 8a90cbd4fe
commit 7624884240

View file

@ -141,7 +141,7 @@ class ModelValidator implements ArrayAccess, IteratorAggregate, Countable {
if (!empty($options['deep']) && isset($data[$model->alias])) {
$recordData = $data[$model->alias];
unset($data[$model->alias]);
$data = array_merge($data, $recordData);
$data += $recordData;
}
$associations = $model->getAssociated();