Skip to content

Commit bf16243

Browse files
committed
value starting with dash escape, close #13
1 parent 477532a commit bf16243

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/DSL/QueryBuilder.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,9 @@ public static function _escape($value): string
294294
foreach ($specialChars as $char) {
295295
$value = str_replace($char, "\\".$char, $value);
296296
}
297+
if (str_starts_with($value, '-')) {
298+
$value = '\\'.$value;
299+
}
297300

298301
return $value;
299302
}

0 commit comments

Comments
 (0)