@@ -443,10 +443,10 @@ private function doInsert(array $statements, array $data, $type): array
443
443
$ keys [] = $ key ;
444
444
if ($ value instanceof Raw) {
445
445
$ values [] = (string )$ value ;
446
- $ bindings [] = ( array ) $ value ->getBindings ();
446
+ $ bindings [] = $ value ->getBindings ();
447
447
} else {
448
448
$ values [] = '? ' ;
449
- $ bindings [] = ( array ) $ value ;
449
+ $ bindings [] = $ value ;
450
450
}
451
451
}
452
452
@@ -458,8 +458,6 @@ private function doInsert(array $statements, array $data, $type): array
458
458
'( ' . $ this ->arrayStr ($ values , ', ' , false ) . ') ' ,
459
459
];
460
460
461
- $ bindings = array_merge (...$ bindings );
462
-
463
461
if (isset ($ statements ['onduplicate ' ]) === true ) {
464
462
465
463
if (\count ($ statements ['onduplicate ' ]) < 1 ) {
@@ -495,15 +493,13 @@ private function getUpdateStatement(array $data): array
495
493
496
494
if ($ value instanceof Raw) {
497
495
$ statements [] = $ statement . $ value ;
498
- $ bindings[] = ( array ) $ value ->getBindings ();
496
+ $ bindings += $ value ->getBindings ();
499
497
} else {
500
498
$ statements [] = $ statement . '? ' ;
501
- $ bindings [] = ( array ) $ value ;
499
+ $ bindings [] = $ value ;
502
500
}
503
501
}
504
502
505
- $ bindings = array_merge (...$ bindings );
506
-
507
503
$ statement = trim ($ this ->arrayStr ($ statements , ', ' , false ));
508
504
509
505
return [$ statement , $ bindings ];
0 commit comments