From 52f872f0fc1a697c1140d330598305bde40a3b6b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 28 Oct 2024 20:05:19 +0000 Subject: [PATCH] Users: Set correct default value for `$user_login` in `retrieve_password()`. This resolves a "passing null to non-nullable" deprecation notice on PHP 8.1+: {{{ Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated }}} Follow-up to [50129], [54477]. Props afragen, peterwilsoncc, SergeyBiryukov. Fixes #62298. Built from https://develop.svn.wordpress.org/trunk@59312 git-svn-id: http://core.svn.wordpress.org/trunk@58698 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/user.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/user.php b/wp-includes/user.php index 700a758990..d078d3d0f8 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -3106,7 +3106,7 @@ function check_password_reset_key( $key, $login ) { * Defaults to `$_POST['user_login']` if not set. * @return true|WP_Error True when finished, WP_Error object on error. */ -function retrieve_password( $user_login = null ) { +function retrieve_password( $user_login = '' ) { $errors = new WP_Error(); $user_data = false; diff --git a/wp-includes/version.php b/wp-includes/version.php index 5b0cbec2c5..61980eb1c3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-alpha-59307'; +$wp_version = '6.8-alpha-59312'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.