WordPress.org

Make WordPress Core

Opened 6 months ago

Closed 6 months ago

Last modified 3 months ago

#48721 closed defect (bug) (fixed)

Undefined Variable URL

Reported by: andreaitm Owned by: SergeyBiryukov
Milestone: 5.4 Priority: normal
Severity: normal Version: 5.1
Component: XML-RPC Keywords:
Focuses: Cc:

Description

I get a notice:

[18-Nov-2019 10:00:50 UTC] PHP Notice: Undefined variable: url in /home/mysite/public_html/blog/wp-includes/class-wp-xmlrpc-server.php on line 6851

Attachments (1)

48721.diff (804 bytes) - added by wpgurudev 6 months ago.
Pass URL to http_headers_useragent filter

Download all attachments as: .zip

Change History (9)

#1 @SergeyBiryukov
6 months ago

  • Component changed from General to XML-RPC

#2 @dkarfa
6 months ago

  • Component changed from XML-RPC to General

Hi @andreaitm,
Welcome to WordPress Trac, reporting tools and reviewing it. Do you use 'http_headers_useragent' filter?

#3 @dkarfa
6 months ago

  • Component changed from General to XML-RPC

#4 @wpgurudev
6 months ago

It seems that http_headers_useragent is being used in xml-rpc file which has been borrowed from WP_Http class. However, there is no $url variable defined.


#5 @SergeyBiryukov
6 months ago

  • Milestone changed from Awaiting Review to 5.4
  • Version set to 5.1

Hi there, welcome to WordPress Trac! Thanks for the report.

Introduced in [42682] for #42186. It looks like the $url is indeed undefined there.

@wpgurudev
6 months ago

Pass URL to http_headers_useragent filter

#6 @SergeyBiryukov
6 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 46750:

XML-RPC: Pass correct variable as the URL parameter to http_headers_useragent filter in wp_xmlrpc_server::pingback_ping().

Props wpgurudev, andreaitm.
Fixes #48721. See #42186.

#7 @rfischmann
5 months ago

Hi, if this was set to "closed" it means it's already fixed in WordPress' current stable/public version? I ask that because I'm still seeing the same notice in the just-released 5.3.2.

#8 @Mte90
3 months ago

It is committed in trunk so wp 5.4 will include this fix.
I am here because I got the same error.

Note: See TracTickets for help on using tickets.