Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#27668 closed defect (bug) (fixed)

When using HTTP Streams, check if parse_url returned a path.

Reported by: dvankooten's profile DvanKooten Owned by: dd32's profile dd32
Milestone: 4.1 Priority: normal
Severity: normal Version: 3.8.1
Component: HTTP API Keywords: has-patch
Focuses: Cc:

Description

When using HTTP Streams to do a remote request to a domain (with no path) PHP's parse_url doesn't return an array with a path key.

When building the $requestPath variable, we should check if the path is set before concatenating strings.

Attachments (1)

27668.diff (860 bytes) - added by barrykooij 11 years ago.

Download all attachments as: .zip

Change History (5)

@barrykooij
11 years ago

#1 @barrykooij
11 years ago

  • Keywords has-patch added

#2 @barrykooij
11 years ago

  • Keywords needs-testing added

#3 @dd32
11 years ago

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

In 29853:

Avoid a PHP Notice when requesting a url without a path component (http://example.com) in the Streams HTTP component.
Props barrykooij for inital patch; Fixes #27668

#4 @dd32
11 years ago

  • Keywords needs-testing removed
  • Milestone changed from Awaiting Review to 4.1
Note: See TracTickets for help on using tickets.