Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#58727 closed defect (bug) (invalid)

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

Reported by: ispreview's profile ispreview Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Formatting Keywords: php81 close
Focuses: coding-standards Cc:

Description

I recently did a test of PHP 8.2.7 on the latest WordPress 6.2.2 release (this might also occur under PHP 8.1 as I didn't test that) and enabled debugging, which resulted in quite a few of these errors through the admin dashboard. I haven't been able to test every section as when I enable debugging this error also kills (completely vanished) the WordPress Admin menu on the left side of the screen, which I assume to be related.

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /../wp-includes/functions.php on line 2165

Change History (9)

#1 @johnbillion
2 years ago

  • Keywords php8 added

#2 @audrasjb
2 years ago

  • Keywords needs-patch added
  • Version 6.2.2 deleted

#3 @audrasjb
2 years ago

  • Focuses coding-standards added

#4 @jrf
2 years ago

  • Keywords php81 added; php8 removed

#5 @jrf
2 years ago

@ispreview That will need a backtrace as this is likely caused by a plugin or theme doing something wrong. If not, we still need to know where in Core to fix the incorrect function call as the function in the functions.php file is passed incorrect information, which should be fixed at the point the information is passed, not where it is received (which is where the deprecation is being thrown).

#6 @ispreview
2 years ago

I disabled all the plugins and found that the one causing this issue occurs when the latest release of Blog2Social (v7.1.2) is enabled.

https://en-gb.wordpress.org/plugins/blog2social/

#7 @jrf
2 years ago

  • Keywords close added; needs-patch removed

@ispreview Thank you for figuring that out. I suggest you report this to the author of the Blog2Social plugin in that case.

#8 follow-up: @Soean
2 years ago

This is not an WordPress issue, so we can close it, right?

The plugin issue seems also to be fixed: https://wordpress.org/support/topic/blog2social-breaks-wp-side-menu-under-php8-2/, can you confirm it @ispreview?

#9 in reply to: ↑ 8 @hellofromTonya
2 years ago

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

Replying to Soean:

This is not an WordPress issue, so we can close it, right?

Yes, it can be closed. I'll mark the resolution as invalid due to it not being a Core issue, but rather a plugin issue.

Thank you everyone for contributing!

Note: See TracTickets for help on using tickets.