Make WordPress Core

Opened 4 months ago

Closed 4 months ago

#62586 closed defect (bug) (wontfix)

rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in wp-includes/formatting.php:2820

Reported by: narenin's profile narenin Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Formatting Keywords: has-patch
Focuses: coding-standards Cc:

Description

I am getting the given PHP Deprecated Error:

rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in wp-includes/formatting.php:2820

This is happening when null is passed to rtrim().

Attachments (1)

Screenshot 2024-11-27 at 6.03.12 PM.png (39.0 KB) - added by narenin 4 months ago.
trim() passing null PHP deprecated error

Download all attachments as: .zip

Change History (4)

@narenin
4 months ago

trim() passing null PHP deprecated error

#1 @mukesh27
4 months ago

  • Component changed from General to Formatting
  • Focuses performance removed

This ticket was mentioned in PR #7902 on WordPress/wordpress-develop by @narenin.


4 months ago
#2

  • Keywords has-patch added; needs-patch removed

#3 @swissspidy
4 months ago

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

If you click on the "+" button in Query Monitor you will see which plugin or theme is causing this warning.

The issue should be fixed there. It's not core's job to ensure the plugin/theme is passing the right type everywhere. The plugin/theme needs to do that properly.

Note: See TracTickets for help on using tickets.