Skip to content

Commit db3f584

Browse files
committed
Remove $length from TokenList constructor
Backports phpmyadmin/sql-parser@8b37c13
1 parent 4aaddfc commit db3f584

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

wp-includes/sqlite/class-wp-sqlite-lexer.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* This file is a port of the Lexer & Tokens_List classes from the PHPMyAdmin/sql-parser library.
3+
* This file is a port of the Lexer & TokensList classes from the PHPMyAdmin/sql-parser library.
44
*
55
* @package wp-sqlite-integration
66
* @see https://github.com/phpmyadmin/sql-parser
@@ -2514,15 +2514,10 @@ public static function is_separator( $str ) {
25142514
* Constructor.
25152515
*
25162516
* @param stdClass[] $tokens The initial array of tokens.
2517-
* @param int $count The count of tokens in the initial array.
25182517
*/
2519-
public function tokens( array $tokens = array(), $count = -1 ) {
2520-
if ( empty( $tokens ) ) {
2521-
return;
2522-
}
2523-
2518+
public function tokens( array $tokens = array() ) {
25242519
$this->tokens = $tokens;
2525-
$this->tokens_count = -1 === $count ? count( $tokens ) : $count;
2520+
$this->tokens_count = count( $tokens );
25262521
}
25272522

25282523
/**

0 commit comments

Comments
 (0)