[wp-trac] [WordPress Trac] #58157: PHP Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in wp-includes/formatting.php

WordPress Trac noreply at wordpress.org
Wed Apr 19 15:31:55 UTC 2023


#58157: PHP Deprecated: str_replace(): Passing null to parameter #3 ($subject) of
type array|string is deprecated in wp-includes/formatting.php
-------------------------------+---------------------
 Reporter:  salvoaranzulla     |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  6.3
Component:  Media              |     Version:
 Severity:  normal             |  Resolution:
 Keywords:  php81 needs-patch  |     Focuses:
-------------------------------+---------------------
Changes (by antpb):

 * keywords:  php81 => php81 needs-patch
 * milestone:  Awaiting Review => 6.3


Comment:

 This is a valid issue and can be fixed by bailing early in the function if
 the value is null. This should prevent any chance of a null value being
 used in parameter 3.

 Moving to 6.3 so we can get this fixed. Should be really straightforward.
 :)

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58157#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list