Opened 4 years ago
Closed 4 years ago
#57458 closed defect (bug) (duplicate)
Login Warnings
| Reported by: | jablonczay | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Login and Registration | Version: | |
| Severity: | normal | Keywords: | php81 |
| Cc: | Focuses: |
Description (last modified by )
Hi,
WordPress version: 6.1.1
PHP version: 8.1
URL: /wp-login.php
Plugins: deactivated
Warnings:
Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/my-domain-name/dev/wp-includes/formatting.php on line 5397Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /home/my-domain-name/dev/wp-includes/pluggable.php on line 598
If the user is logged in, there are a lot of warnings for example on this page as well: /wp-admin/update-core.php?action=core-major-auto-updates-settings&value=disable&_wpnonce=.......
Thank you for your time!
Kind regards,
Jablonczay
Attachments (1)
Change History (4)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I believe this is ultimately caused by this call to wp_signon() with an empty array of credentials: https://github.com/WordPress/wordpress-develop/blob/4912e0107dddbc34bdac71a1a7bc9f8e21335742/src/wp-login.php#L1233.
Inside
wp_signon()theuser_loginanduser_passwordelements are implicitly set to null here: https://github.com/WordPress/wordpress-develop/blob/4912e0107dddbc34bdac71a1a7bc9f8e21335742/src/wp-includes/user.php#L67 and these null values propagate down topreg_replace()andtrim().