WordPress / WordPress/Requests
Curl request_multiple uses wrong hooks object
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 500
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 5
Description
The curl.before_multi_exec and curl.after_multi_exec hooks fire against the $request hook instance instead of the one in $options. In the vast majority of cases this probably is irrelevant. But could be unexpected if the last request in a multi-request has a custom hooks instance defined for it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Curl implementation of request_multiple and trace how the curl.before_multi_exec and curl.after_multi_exec hooks are selected. Compare the hook instance from $request with the one in $options. Done means both multi-exec hooks run against the configured $options hook instance, including when the last request has custom hooks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100