diff --git a/wp-includes/option.php b/wp-includes/option.php index 270b78ca1b..c84f1660f9 100644 --- a/wp-includes/option.php +++ b/wp-includes/option.php @@ -1700,7 +1700,11 @@ function wp_user_settings() { } $last_saved = (int) get_user_option( 'user-settings-time', $user_id ); - $current = isset( $_COOKIE[ 'wp-settings-time-' . $user_id ] ) ? preg_replace( '/[^0-9]/', '', $_COOKIE[ 'wp-settings-time-' . $user_id ] ) : 0; + $current = 0; + + if ( isset( $_COOKIE[ 'wp-settings-time-' . $user_id ] ) ) { + $current = (int) preg_replace( '/[^0-9]/', '', $_COOKIE[ 'wp-settings-time-' . $user_id ] ); + } // The cookie is newer than the saved value. Update the user_option and leave the cookie as-is. if ( $current > $last_saved ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 9a6f07fc8b..593e5b2abc 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-alpha-59370'; +$wp_version = '6.8-alpha-59373'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.