Commit 12471e53 authored by David Johnson's avatar David Johnson

Return proper error.

parent fd45aa32
......@@ -2111,6 +2111,11 @@ function pm_parseuserquery($q,$debug = false) {
foreach ($toka as $i) {
# echo "needs = " . implode(',',$needs) . "; ";
$sneed = whichsat($i,$needs);
if ($sneed == '') {
$errstr = "Parser error at token '$i'!";
break;
}
$needs = $trans[$sneed];
if (!isset($needs)) {
$needs = array();
......@@ -2118,11 +2123,6 @@ function pm_parseuserquery($q,$debug = false) {
# echo "sneed = $sneed; newneeds = " . implode(',',$needs) . "<br>\n";
if ($sneed == '') {
$errstr = "Malformed expression at token '$i'!";
break;
}
if ($sneed == 'ocont') {
++$oc;
$retq .= '(';
......
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