[wp-trac] [WordPress Trac] #63107: two deprecated warnings in /wp-includes/functions.php
WordPress Trac
noreply at wordpress.org
Sat Mar 15 09:08:48 UTC 2025
#63107: two deprecated warnings in /wp-includes/functions.php
--------------------------+-------------------------------
Reporter: rpayne7264 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 6.7.2
Severity: normal | Keywords: changes-requested
Focuses: |
--------------------------+-------------------------------
two deprecated warnings in /wp-includes/functions.php:
'''1)''' Backtrace from warning 'strpos(): Passing null to parameter #1
($haystack) of type string is deprecated' at /wp-includes/functions.php
7329:
this is the code causing the error: {{{$scheme_separator = strpos( $path,
'://' );}}}
this is the adjusted code to fix it: {{{$scheme_separator = strpos($path
?? '', '://');}}}
'''2)''' Backtrace from warning 'str_replace(): Passing null to parameter
#3 ($subject) of type array|string is deprecated' at
/home/rdptechs/homebasedlife.com/wp-includes/functions.php 2189:
here is the code causing the error: {{{$path = str_replace( '\\', '/',
$path );}}}
this the adjusted code to fix it: {{{$path = str_replace('\\', '/', $path
?? '');}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63107>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list