Skip to content

Commit 6519c03

Browse files
authored
There was still an error, my bad
I hadn't realized count(false) returned 1
1 parent ccd0745 commit 6519c03

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/PHPSQLParser/processors/SQLProcessor.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ public function process($tokens) {
6262
$out = false;
6363

6464
// $tokens may come as a numeric indexed array starting with an index greater than 0 (or as a boolean)
65-
if ( $tokenCount = count($tokens) ){
65+
$tokenCount = count($tokens);
66+
if ( is_array($tokens) ){
6667
$tokens = array_values($tokens);
6768
}
6869
for ($tokenNumber = 0; $tokenNumber < $tokenCount; ++$tokenNumber) {

0 commit comments

Comments
 (0)