WordPress.org

Make WordPress Core

Opened 7 weeks ago

Closed 6 weeks ago

Last modified 6 weeks ago

#39783 closed defect (bug) (fixed)

Requests http_api_curl action doesn't pass $handle by reference

Reported by: pento Owned by: dd32
Milestone: 4.7.3 Priority: normal
Severity: normal Version: 4.7
Component: HTTP API Keywords: has-patch has-unit-tests commit
Focuses: Cc:

Description

The Requests compatibility layer for the http_api_curl action was introduced in [39212].

Historically, the $handle parameter has been passed by reference, but the call in WP_HTTP_Requests_Hooks::dispatch() doesn't do that.

Attachments (2)

39783.diff (1.5 KB) - added by pento 7 weeks ago.
39783.2.diff (1.6 KB) - added by pento 7 weeks ago.

Download all attachments as: .zip

Change History (10)

@pento
7 weeks ago

@pento
7 weeks ago

#1 @pento
7 weeks ago

  • Keywords has-patch has-unit-tests added; needs-patch needs-unit-tests removed

The test has a fake assert, because it's actually testing for a PHP error. :-)

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


6 weeks ago

#3 @jnylen0
6 weeks ago

Bringing the newer call into compliance with the existing one and the filter docs seems like a good idea to me.

cc @rmccue @dd32 since you worked on #37843 - one of you want to take this one for 4.7.3?

#4 @dd32
6 weeks ago

  • Keywords commit added

Since this has only been broken in 4.7.x I don't see the harm in fixing it, a pure oversight.

#5 @dd32
6 weeks ago

#39872 was marked as a duplicate.

#6 @dd32
6 weeks ago

Cross-referencing - Reporter in #39872 reports that this patch fixes the issue for them.

#7 @dd32
6 weeks ago

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

In 40068:

HTTP API: Restore backwards compatibility with the http_api_curl filter - it expects that the handle parameter is passed as a reference, however [39212] missed that.

Props pento.
Fixes #39783.

#8 @dd32
6 weeks ago

In 40069:

HTTP API: Restore backwards compatibility with the http_api_curl filter - it expects that the handle parameter is passed as a reference, however [39212] missed that.

Props pento.
Merges [40068] to the 4.7 branch.
Fixes #39783.

Note: See TracTickets for help on using tickets.