#58066 closed defect (bug) (duplicate)
PHP Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
Reported by: | ebai4 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 6.2 |
Component: | Formatting | Keywords: | php81 |
Focuses: | Cc: |
Description (last modified by )
WP version : 6.2
PHP: 8.1.9
After updating to PHP 8.1.9 I get this error, even with no active plugins and with the Twenty Twenty-Three theme on.
PHP Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in xxxxxxxx\wp-includes\formatting.php on line 4280
Change History (6)
#1
@
20 months ago
- Component changed from General to Formatting
- Description modified (diff)
- Keywords php81 added
#3
@
20 months ago
I have the same issue with PHP v8.1.20
It looks like you get this error ( at least in my case ) when no author is assigned to a post.
I see it on the post overview page for a store locator plugin in the author column ( no author name is visible, just the error ). The post data is imported from a CSV file, so the post is not manually created.
When I open a post where this error shows up and save it, so it's assigned to an author, the error is gone.
#4
@
20 months ago
- Resolution set to worksforme
- Status changed from new to closed
You're right tijmensmit. In my case, it looks like the user who originally created the page was deleted therefore some pages didn't have an author. Assigning an author to the page solves it. Thanks!
With fresh installation of WordPress 6.2 with nothing enabled but only Twenty Twenty-Three theme doesn't give any error for PHP v8.1.19 or v8.1.13 or even v8.2.x
I am not sure how you are getting this warning, can you please describe how we can recreate the issue? Maybe it's an issue on your end machine only.