Closed GoogleCodeExporter closed 9 years ago
Looks like the parser expects every expression tree to be an array, but the
code for parsing an "AGAINST" clause will return a single value rather than an
array if the contents are a single value (on line 1112):
$processed = $list[0];
Changing this to return an array will fix the glitch for your particular code
sample:
$processed = array($list[0]);
Regarding the print_r: It looks like the author put the print_r in there
because that is an exceptional case that should normally never occur and
signals a parsing bug. But since you have the source code you can just comment
it out :-)
It looks like there's another debug statement that occurs on lines 165-169 if
the argument to parse is not a string:
if(!is_string($sql)) {
echo "SQL:\n";
print_r($sql);
exit;
}
Original comment by kbacht...@gmail.com
on 20 Oct 2011 at 5:16
I think, I have solved the parsing problem described by this issue.
Check out the bleeding edge on
https://www.phosco.info/publicsvn/php-sql-parser/trunk/
Original comment by pho...@gmx.de
on 17 Feb 2012 at 1:09
Accepted fixed codebase.
Original comment by greenlion@gmail.com
on 12 Mar 2012 at 9:56
Original issue reported on code.google.com by
rel...@gmail.com
on 19 Jun 2011 at 1:31