We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 724fa89 + 6519c03 commit 249e834Copy full SHA for 249e834
src/PHPSQLParser/processors/SQLProcessor.php
@@ -61,7 +61,11 @@ public function process($tokens) {
61
$skip_next = 0;
62
$out = false;
63
64
- $tokenCount = count($tokens);
+ // $tokens may come as a numeric indexed array starting with an index greater than 0 (or as a boolean)
65
+ $tokenCount = count($tokens);
66
+ if ( is_array($tokens) ){
67
+ $tokens = array_values($tokens);
68
+ }
69
for ($tokenNumber = 0; $tokenNumber < $tokenCount; ++$tokenNumber) {
70
71
// https://github.com/greenlion/PHP-SQL-Parser/issues/279
0 commit comments