Skip to content

Commit 747ee35

Browse files
committed
Fix deprecation of implicitly marking parameter as nullable in PHP 8.4
1 parent 767d246 commit 747ee35

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

wp-includes/sqlite-ast/class-wp-sqlite-driver-exception.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function __construct(
2020
WP_SQLite_Driver $driver,
2121
string $message,
2222
$code = 0,
23-
Throwable $previous = null
23+
?Throwable $previous = null
2424
) {
2525
parent::__construct( $message, 0, $previous );
2626
$this->code = $code;

wp-includes/sqlite-ast/class-wp-sqlite-driver.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -2783,7 +2783,7 @@ private function translate_datetime_literal( string $value ): string {
27832783
private function recreate_table_from_information_schema(
27842784
bool $table_is_temporary,
27852785
string $table_name,
2786-
array $column_map = null
2786+
?array $column_map = null
27872787
): void {
27882788
if ( null === $column_map ) {
27892789
$columns_table = $this->information_schema_builder->get_table_name( $table_is_temporary, 'columns' );
@@ -3538,7 +3538,7 @@ private function set_results_from_fetched_data( array $data ): void {
35383538
*
35393539
* @param int|null $override Override the affected rows.
35403540
*/
3541-
private function set_result_from_affected_rows( int $override = null ): void {
3541+
private function set_result_from_affected_rows( ?int $override = null ): void {
35423542
/*
35433543
* SELECT CHANGES() is a workaround for the fact that $stmt->rowCount()
35443544
* returns "0" (zero) with the SQLite driver at all times.
@@ -3564,7 +3564,7 @@ private function set_result_from_affected_rows( int $override = null ): void {
35643564
private function new_driver_exception(
35653565
string $message,
35663566
$code = 0,
3567-
Throwable $previous = null
3567+
?Throwable $previous = null
35683568
): WP_SQLite_Driver_Exception {
35693569
return new WP_SQLite_Driver_Exception( $this, $message, $code, $previous );
35703570
}

0 commit comments

Comments
 (0)