Skip to content

Commit

Permalink
greenlion#347 fixes deprecation warning with PHP 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Gareth Ellis committed Jan 28, 2022
1 parent e38d6f0 commit 2a3060a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/PHPSQLParser/processors/SQLProcessor.php
Expand Up @@ -59,7 +59,7 @@ public function process($tokens) {
$prev_category = "";
$token_category = "";
$skip_next = 0;
$out = false;
$out = array();

// $tokens may come as a numeric indexed array starting with an index greater than 0 (or as a boolean)
$tokenCount = count($tokens);
Expand Down Expand Up @@ -509,6 +509,10 @@ public function process($tokens) {
$prev_category = $token_category;
}

if (count($out) === 0) {
return false;
}

return parent::process($out);
}
}
Expand Down

0 comments on commit 2a3060a

Please sign in to comment.