Make WordPress Core

#57636 closed defect (bug) (duplicate)

Logout gives PHP warnings preg_replace() in formatting.php and trim() in pluggable.php

Reported by: ipajen's profile ipajen Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.2
Component: Administration Keywords: PHP81
Focuses: Cc:

Description

If a Admin user logs out and WP_DEBUG_DISPLAY is set true following warnings is given in PHP 8.1 in a fresh WP installation nightly 6.2-alpha-55225

Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /public_html/blog/wp-includes/formatting.php on line 5398

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /public_html/blog/wp-includes/pluggable.php on line 600

Change History (2)

#1 @johnbillion
13 months ago

This is likely the same issue as #56850

#2 @SergeyBiryukov
13 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi there, thanks for the ticket!

This is already fixed for WordPress 6.2 in [55301] / #56850.

Note: See TracTickets for help on using tickets.