Changeset 59312
- Timestamp:
- 10/28/2024 08:03:13 PM (3 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/user.php
r59232 r59312 3107 3107 * @return true|WP_Error True when finished, WP_Error object on error. 3108 3108 */ 3109 function retrieve_password( $user_login = null) {3109 function retrieve_password( $user_login = '' ) { 3110 3110 $errors = new WP_Error(); 3111 3111 $user_data = false; -
trunk/tests/phpunit/tests/user/retrievePassword.php
r56559 r59312 75 75 $this->assertTrue( retrieve_password( 'bar@example.com' ), 'Fetching user by email failed.' ); 76 76 } 77 78 /** 79 * Tests that PHP 8.1 "passing null to non-nullable" deprecation notice 80 * is not thrown when the `$user_login` parameter is empty. 81 * 82 * The notice that we should not see: 83 * `Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated`. 84 * 85 * @ticket 62298 86 */ 87 public function test_retrieve_password_does_not_throw_deprecation_notice_with_default_parameters() { 88 $this->assertWPError( retrieve_password() ); 89 } 77 90 }
Note: See TracChangeset
for help on using the changeset viewer.