Skip to content

Commit

Permalink
Fixing BufferedQuery when ends with odd number of backslashes
Browse files Browse the repository at this point in the history
Signed-off-by: Fawzi E. Abdulfattah <iifawzie@gmail.com>
  • Loading branch information
iifawzi committed Aug 11, 2021
1 parent 998338c commit aa9c1a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Utils/BufferedQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public function extract($end = false)
* be ignored.
*/
if ((($this->status & static::STATUS_COMMENT) === 0) && ($this->query[$i] === '\\')) {
$this->current .= $this->query[$i] . $this->query[++$i];
$this->current .= $this->query[$i] . ($i + 1 < $len ? $this->query[++$i] : '');
continue;
}

Expand Down

0 comments on commit aa9c1a7

Please sign in to comment.