Make WordPress Core

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 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 4 years ago.

Download all attachments as: .zip

Change History (4)

#1 @sabernhardt
4 years ago

  • Description modified (diff)
  • Keywords php81 added

#2 @johnbillion
4 years ago

  • Keywords needs-patch added
  • Milestone Awaiting Review → Future Release
  • Version 6.1.1

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
4 years ago

  • Keywords needs-patch removed
  • Milestone Future Release
  • Resolution → duplicate
  • Status new → 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.