[wp-trac] [WordPress Trac] #62298: Update default parameter of `retrieve_password()` for PHP8 compatibility

WordPress Trac noreply at wordpress.org
Mon Oct 28 20:03:30 UTC 2024


#62298: Update default parameter of `retrieve_password()` for PHP8 compatibility
-----------------------------+--------------------------------
 Reporter:  peterwilsoncc    |       Owner:  SergeyBiryukov
     Type:  defect (bug)     |      Status:  closed
 Priority:  normal           |   Milestone:  6.8
Component:  Users            |     Version:
 Severity:  normal           |  Resolution:  fixed
 Keywords:  php81 has-patch  |     Focuses:  php-compatibility
-----------------------------+--------------------------------
Changes (by SergeyBiryukov):

 * owner:  (none) => SergeyBiryukov
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"59312" 59312]:
 {{{
 #!CommitTicketReference repository="" revision="59312"
 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.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62298#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list