Make WordPress Core

#57458 closed defect (bug) (duplicate)

Login Warnings

Reported by: jablonczay's profile jablonczay Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Login and Registration Keywords: php81
Focuses: Cc:

Description (last modified by sabernhardt)

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 5397
  • Deprecated: 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)

Screenshot 2023-01-13 at 18.33.53.png (138.4 KB) - added by johnbillion 19 months ago.

Download all attachments as: .zip

Change History (4)

#1 @sabernhardt
19 months ago

  • Description modified (diff)
  • Keywords php81 added

#2 @johnbillion
19 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release
  • Version 6.1.1 deleted

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() the user_login and user_password elements 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 to preg_replace() and trim().

#3 @SergeyBiryukov
19 months ago

  • Keywords needs-patch removed
  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi there, welcome to WordPress Trac!

Thanks for the report, we're already tracking this issue in #56850.

Note: See TracTickets for help on using tickets.