[wp-trac] [WordPress Trac] #62350: Depricated warning
WordPress Trac
noreply at wordpress.org
Thu Nov 7 11:16:54 UTC 2024
#62350: Depricated warning
--------------------------+------------------------------
Reporter: martenw | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by yogeshbhutkar):
Hi @martenw, thank you for taking the time to raise the ticket. I went
through the wp-includes/functions.php file's line 7302 and line 2189 and
here are my observations:
1. In line 2189, there's one occurrence of str_replace.
{{{
$path = str_replace( '\\', '/', $path );
}}}
- Observation: You are receiving the deprecation warning probably because
null is accidentally being passed in $path. However, per my local
observation and testing, $path became false in 3 notable scenarios, but it
never became null and if the path becomes false by any chance, then an
empty string is returned without causing any issue. Therefore, I was not
able to reproduce this behavior. It would be great if you could provide me
with more insights on reproducing the same behavior.
2. The other deprecation warning mentioned the usage of null in the place
of $haystack parameter at line 7302 but as per my observations, I didn't
find any strpos() function there.
The above-mentioned details are all subjective to the WordPress version
used, hence, it would be extremely beneficial if you could also include
your WordPress version and other related details.
It would still be helpful if the steps to replicate the issue be provided
for me to evaluate the root cause further.
My Environment Details:
6.8-alpha-59274-src ( The latest trunk source. )
Thank You.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62350#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list