[wp-trac] [WordPress Trac] #61268: PHP Deprecated: ltrim() in formatting esc_url.

WordPress Trac noreply at wordpress.org
Wed May 22 16:56:32 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 [comment:2 neo2k23]:
 >
 > But should formatting not deal with this so the issue does not occur at
 all?  because now everybody calling esc_url has to check if the url does
 not contain null or is empty.

 Maybe, but I think it is generally considered best policy for bugs like
 this to fix the caller, as the caller should not be passing empty values
 to `esc_url`.  See, for example, ticket #59154, which is a similar issue
 to yours (where the fix was to fix the caller rather than change
 `esc_url`).

 However, your issue looks a bit more complicated as it seems that the
 caller is the [https://wordpress.org/plugins/maintenance/ Maintenance]
 plugin but it looks like the caller is not really at fault here.  I would
 guess you have some other plugin installed which disables XML-RPC?

 It might be helpful to post a list of all active plugins on your site.
 (You can get this in the admin section by going to Tools → Site Health →
 Info → Active Plugins.)

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


More information about the wp-trac mailing list