[wp-trac] [WordPress Trac] #61268: PHP Deprecated: ltrim() in formatting esc_url.
WordPress Trac
noreply at wordpress.org
Wed May 22 14:04:19 UTC 2024
#61268: PHP Deprecated: ltrim() in formatting esc_url.
--------------------------+------------------------------
Reporter: neo2k23 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by siliconforks):
Replying to [ticket:61268 neo2k23]:
> Since any information is missing on the location which is calling
esc_url it is hard to debug which theme code or plugin code is responsible
for this.
You could try adding some code like this:
{{{#!php
if ( empty( $url ) ) {
error_log( print_r( debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS
), true ) );
}
}}}
That should record in the error log whoever is calling `esc_url()` with an
empty argument.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61268#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list