Skip to content

Commit eda0b95

Browse files
committed
Fix quote doubling lexing
1 parent 17ad82d commit eda0b95

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/SQLParser.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,11 @@ private function _lex($sql){
129129
$c += 2;
130130
continue;
131131
}
132+
# quote doubling
133+
if ($sql[$c] == $q && isset($sql[$c+1]) && $sql[$c+1] == $q){
134+
$c += 2;
135+
continue;
136+
}
132137
if ($sql[$c] == $q){
133138
$slen = $c + 1 - $pos;
134139
$source_map[] = array($pos, $slen);

0 commit comments

Comments
 (0)