fix (13377) : update regex on jsonTokenizer

parent 7b1a6a47
Pipeline #7121 failed with stages
......@@ -213,9 +213,8 @@ class JsonTokenizer
do {
$chunk = fread($this->stream, $this->threshold);
$length = strlen($chunk);
if (preg_match('#^[^"\\\\]*(?:\\\\.[^"\\\\]*)*"#', $chunk, $matches)) {
$tail = substr($matches[0], 0, -1);
if (preg_match('/(?<!\\\\)(?:\\\\{2})*\\K"/', $chunk, $matches, PREG_OFFSET_CAPTURE)) {
$tail = substr($chunk, 0, $matches[0][1]);
$end = strlen($tail);
$size += $end;
fwrite($buffer, $tail);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment