FilterQueryString: fix parsing expression lists

The parser sometimes failed when reaching a=b&b=(c|d|e) - fixed.
This commit is contained in:
Thomas Gelf 2014-06-20 13:04:53 +02:00
parent 1ea15e1f66
commit f2605b89ff
1 changed files with 3 additions and 2 deletions

View File

@ -32,13 +32,14 @@ class FilterQueryString
protected function readNextValue()
{
$var = rawurldecode($this->readUnlessSpecialChar());
if ($var === '' && $this->nextChar() === '(') {
if ($this->nextChar() === '(') {
$this->readChar();
$var = preg_split('~\|~', $this->readUnless(')'));
if ($this->readChar() !== ')') {
$this->parseError(null, 'Expected ")"');
}
} else {
$var = rawurldecode($this->readUnless(array(')', '&', '|', '>', '<')));
}
return $var;
}