Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix deprecation warnings in existing tests
  • Loading branch information
JanJakes committed Oct 31, 2025
commit 4e4c09723896fe0a5dd78f6264f89f460495933b
2 changes: 1 addition & 1 deletion tests/mysql/WP_MySQL_Server_Suite_Lexer_Tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function test_tokenize_mysql_test_suite(): void {
}

try {
while ( ( $record = fgetcsv( $handle ) ) !== false ) {
while ( ( $record = fgetcsv( $handle, null, ',', '"', '\\' ) ) !== false ) {
$query = $record[0];
$lexer = new WP_MySQL_Lexer( $query );
$tokens = $lexer->remaining_tokens();
Expand Down
2 changes: 1 addition & 1 deletion tests/mysql/WP_MySQL_Server_Suite_Parser_Tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function data_parse_mysql_test_suite(): Generator {
try {
$data = array();
$batch = 1;
while ( ( $record = fgetcsv( $handle ) ) !== false ) {
while ( ( $record = fgetcsv( $handle, null, ',', '"', '\\' ) ) !== false ) {
$data[] = $record;
if ( count( $data ) === 1000 ) {
yield "batch-$batch" => array( $data );
Expand Down
4 changes: 2 additions & 2 deletions wp-includes/sqlite-ast/class-wp-sqlite-driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -1598,7 +1598,7 @@ private function execute_update_statement( WP_Parser_Node $node ): void {
* UPDATE t, information_schema.columns c SET t.column = c.column ...
*/
foreach ( $table_alias_map as $alias => $data ) {
if ( 'information_schema' === strtolower( $data['database'] ) ) {
if ( 'information_schema' === strtolower( $data['database'] ?? '' ) ) {
throw $this->new_access_denied_to_information_schema_exception();
}
}
Expand Down Expand Up @@ -2281,7 +2281,7 @@ private function execute_show_statement( WP_Parser_Node $node ): void {
'flags' => array( 'not_null' ),
'table' => '',
'name' => 'Create Table',
'len' => strlen( $sql ),
'len' => strlen( $sql ?? '' ),
'precision' => 31,
),
);
Expand Down