Skip to content

Commit 06e1b62

Browse files
committed
Reverted changes
1 parent 60385cc commit 06e1b62

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/Pecee/Pixie/QueryBuilder/Adapters/BaseAdapter.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -443,10 +443,10 @@ private function doInsert(array $statements, array $data, $type): array
443443
$keys[] = $key;
444444
if ($value instanceof Raw) {
445445
$values[] = (string)$value;
446-
$bindings[] = (array)$value->getBindings();
446+
$bindings[] = $value->getBindings();
447447
} else {
448448
$values[] = '?';
449-
$bindings[] = (array)$value;
449+
$bindings[] = $value;
450450
}
451451
}
452452

@@ -458,8 +458,6 @@ private function doInsert(array $statements, array $data, $type): array
458458
'(' . $this->arrayStr($values, ', ', false) . ')',
459459
];
460460

461-
$bindings = array_merge(...$bindings);
462-
463461
if (isset($statements['onduplicate']) === true) {
464462

465463
if (\count($statements['onduplicate']) < 1) {
@@ -495,15 +493,13 @@ private function getUpdateStatement(array $data): array
495493

496494
if ($value instanceof Raw) {
497495
$statements[] = $statement . $value;
498-
$bindings[] = (array)$value->getBindings();
496+
$bindings += $value->getBindings();
499497
} else {
500498
$statements[] = $statement . '?';
501-
$bindings[] = (array)$value;
499+
$bindings[] = $value;
502500
}
503501
}
504502

505-
$bindings = array_merge(...$bindings);
506-
507503
$statement = trim($this->arrayStr($statements, ', ', false));
508504

509505
return [$statement, $bindings];

0 commit comments

Comments
 (0)