File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -305,7 +305,8 @@ protected function compileBinds()
305
305
*/
306
306
protected function matchNamedBinds (string $ sql , array $ binds ): string
307
307
{
308
- $ replacers = [];
308
+ $ replacersFrom = [];
309
+ $ replacersTo = [];
309
310
310
311
foreach ($ binds as $ placeholder => $ value ) {
311
312
// $value[1] contains the boolean whether should be escaped or not
@@ -318,10 +319,11 @@ protected function matchNamedBinds(string $sql, array $binds): string
318
319
$ escapedValue = '( ' . implode (', ' , $ escapedValue ) . ') ' ;
319
320
}
320
321
321
- $ replacers [": {$ placeholder }: " ] = $ escapedValue ;
322
+ $ replacersFrom [] = ": {$ placeholder }: " ;
323
+ $ replacersTo [] = $ escapedValue ;
322
324
}
323
325
324
- return strtr ( $ sql , $ replacers );
326
+ return str_replace ( $ replacersFrom , $ replacersTo , $ sql );
325
327
}
326
328
327
329
/**
You can’t perform that action at this time.
0 commit comments