diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 956e8290e2..50b43a5175 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -4883,7 +4883,11 @@ function sanitize_option( $option, $value ) { break; case 'blog_charset': - $value = preg_replace( '/[^a-zA-Z0-9_-]/', '', $value ); // Strips slashes. + if ( is_string( $value ) ) { + $value = preg_replace( '/[^a-zA-Z0-9_-]/', '', $value ); // Strips slashes. + } else { + $value = ''; + } break; case 'blog_public': @@ -4918,7 +4922,11 @@ function sanitize_option( $option, $value ) { break; case 'gmt_offset': - $value = preg_replace( '/[^0-9:.-]/', '', $value ); // Strips slashes. + if ( is_numeric( $value ) ) { + $value = preg_replace( '/[^0-9:.-]/', '', $value ); // Strips slashes. + } else { + $value = ''; + } break; case 'siteurl': diff --git a/wp-includes/version.php b/wp-includes/version.php index 88957605b1..54baec6059 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-beta3-56131'; +$wp_version = '6.3-beta3-56132'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.