Skip to content

Commit 15e5811

Browse files
committed
chore: fix invalid argument types in ms-site.php
1 parent 5b0f14e commit 15e5811

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/wp-includes/ms-site.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -600,9 +600,9 @@ function wp_validate_site_data( $errors, $data, $old_site = null ) {
600600

601601
// Allow '0000-00-00 00:00:00', although it be stripped out at this point.
602602
if ( '0000-00-00 00:00:00' !== $data[ $date_field ] ) {
603-
$month = substr( $data[ $date_field ], 5, 2 );
604-
$day = substr( $data[ $date_field ], 8, 2 );
605-
$year = substr( $data[ $date_field ], 0, 4 );
603+
$month = (int) substr( $data[ $date_field ], 5, 2 );
604+
$day = (int) substr( $data[ $date_field ], 8, 2 );
605+
$year = (int) substr( $data[ $date_field ], 0, 4 );
606606
$valid_date = wp_checkdate( $month, $day, $year, $data[ $date_field ] );
607607
if ( ! $valid_date ) {
608608
$errors->add( 'site_invalid_' . $date_field, __( 'Both registration and last updated dates must be valid dates.' ) );
@@ -1128,7 +1128,7 @@ function update_site_meta( $site_id, $meta_key, $meta_value, $prev_value = '' )
11281128
* @return bool Whether the site meta key was deleted from the database.
11291129
*/
11301130
function delete_site_meta_by_key( $meta_key ) {
1131-
return delete_metadata( 'blog', null, $meta_key, '', true );
1131+
return delete_metadata( 'blog', 0, $meta_key, '', true );
11321132
}
11331133

11341134
/**

0 commit comments

Comments
 (0)