Skip to content

Commit a0bd8bf

Browse files
committed
Fix PHP 8.4 deprecation: Implicitly marking parameter as nullable is deprecated, the explicit nullable type must be used instead
1 parent 55612bb commit a0bd8bf

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

dt-mapping/geocode-api/location-grid-geocoder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ public function query_level_by_lnglat( float $longitude, float $latitude, int $l
642642
return $query;
643643
}
644644

645-
public function query_lowest_level_by_lnglat( float $longitude, float $latitude, string $country_code = null ): array {
645+
public function query_lowest_level_by_lnglat( float $longitude, float $latitude, ?string $country_code = null ): array {
646646
global $wpdb;
647647

648648
if ( is_null( $country_code ) ) {

dt-mapping/location-grid-meta.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public static function add_location_grid_meta( $post_id, array $location_grid_me
168168
return $wpdb->insert_id;
169169
}
170170

171-
public static function delete_location_grid_meta( int $post_id, $type, int $value, array $existing_post = null ) {
171+
public static function delete_location_grid_meta( int $post_id, $type, int $value, ?array $existing_post = null ) {
172172
global $wpdb;
173173

174174
$status = false;
@@ -274,7 +274,7 @@ public static function add_user_location_grid_meta( $user_id, $location_grid_met
274274
return $wpdb->insert_id;
275275
}
276276

277-
public static function delete_user_location_grid_meta( int $user_id, $type, $grid_meta_id, array $existing_post = null ) {
277+
public static function delete_user_location_grid_meta( int $user_id, $type, $grid_meta_id, ?array $existing_post = null ) {
278278
global $wpdb;
279279

280280
$status = false;

includes/utilities.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public static function get_contact_defaults( $force = false ) {
128128
}
129129
}
130130

131-
public static function get_theme( string $theme = 'wide-heavy', string $token = null ) {
131+
public static function get_theme( string $theme = 'wide-heavy', ?string $token = null ) {
132132

133133
$meta = self::get_form_meta( $token );
134134
if ( empty( $meta ) ) {

0 commit comments

Comments
 (0)