Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#48721 closed defect (bug) (fixed)

Undefined Variable URL

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


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 5 years ago.
Pass URL to http_headers_useragent filter

Download all attachments as: .zip

Change History (9)

#1 @SergeyBiryukov
5 years ago

  • Component changed from General to XML-RPC

#2 @dkarfa
5 years 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
5 years ago

  • Component changed from General to XML-RPC

#4 @wpgurudev
5 years 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
5 years 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.

5 years ago

Pass URL to http_headers_useragent filter

#6 @SergeyBiryukov
5 years 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 years 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
4 years 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.