mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
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:
parent
8a90cbd4fe
commit
7624884240
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue