mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Remove key-ordering sensitivity in fixtures
Previously, the field order was effectively taken from the last record in the fixture, but the values were ordered according to the array_unique call above - primarily determined by the first record in the fixture. If these two orders differed, values were added under the wrong keys.
This commit is contained in:
parent
246c09ae40
commit
12a142d0ca
1 changed files with 0 additions and 1 deletions
|
@ -277,7 +277,6 @@ class CakeTestFixture {
|
|||
$fields = array_unique($fields);
|
||||
$default = array_fill_keys($fields, null);
|
||||
foreach ($this->records as $record) {
|
||||
$fields = array_keys($record);
|
||||
$values[] = array_values(array_merge($default, $record));
|
||||
}
|
||||
$nested = $db->useNestedTransactions;
|
||||
|
|
Loading…
Reference in a new issue