Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#48721 closed defect (bug) (fixed)

Undefined Variable URL

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

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

Download all attachments as: .zip

Change History (9)

#1 @SergeyBiryukov
7 years ago

  • Component GeneralXML-RPC

#2 @dkarfa
7 years ago

  • Component XML-RPCGeneral

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

#3 @dkarfa
7 years ago

  • Component GeneralXML-RPC

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

  • Milestone Awaiting Review5.4
  • Version5.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
7 years ago

Pass URL to http_headers_useragent filter

#6 @SergeyBiryukov
7 years ago

  • Owner set to SergeyBiryukov
  • Resolutionfixed
  • Status newclosed

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
7 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
7 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.