Skip to content

Commit 3d87b13

Browse files
committed
Add quote to string binding only
1 parent 4030ff1 commit 3d87b13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/QueryLog/LogWriter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ protected function getMessages(QueryExecuted $query): array
3535
? "/(?<!\?)\?(?=(?:[^'\\\']*'[^'\\']*')*[^'\\\']*$)(?!\?)/"
3636
: "/:{$key}(?=(?:[^'\\\']*'[^'\\\']*')*[^'\\\']*$)/";
3737

38-
// Mimic bindValue and only quote non-integer and non-float data types
39-
if (!is_int($binding) && !is_float($binding)) {
38+
// Mimic bindValue and only string data types
39+
if (is_string($binding)) {
4040
$binding = $this->quote($binding);
4141
}
4242

0 commit comments

Comments
 (0)