#25179 closed defect (bug) (fixed)
New required parameter added to WP_Http::processHeaders can cause warnings
Reported by: | jshreve | Owned by: | dd32 |
---|---|---|---|
Milestone: | 3.7 | Priority: | normal |
Severity: | normal | Version: | 3.7 |
Component: | HTTP API | Keywords: | |
Focuses: | Cc: |
Description
3.7 only bug (so does not involve stable)
I noticed that a new required parameter was added to WP_Http::processHeaders in [25044] by @dd32.
The problem is, if something was using this function (which is a public member) then you'll get a warning like:
Warning: Missing argument 2 for WP_Http::processHeaders()
I've since patched my code to pass the $url - but since this function has been around since 2.7 I'm guessing other code out there will hit that warning.
Change History (4)
#1
follow-up:
↓ 2
@
11 years ago
- Component changed from General to HTTP
- Milestone changed from Awaiting Review to 3.7
- Version set to trunk
#2
in reply to:
↑ 1
@
11 years ago
Curious though, Why/how are you using this method? It's only really public because of the architecture of WP_HTTP requires it to be a public method.
I actually wasn't using it personally. The Jetpack server code uses it mixed with some CURL stuff and some signature writing stuff. It does it instead of straight WP_Http. The comment says "so it can do 'mulitpart/form-data requests". Again, that's all going based on comments in the source code :) - I was just fixing a warning I saw and figured someone else, somewhere might also be using the function.
Indeed it should probably be marked optional if anyone else is using it
Curious though, Why/how are you using this method? It's only really public because of the architecture of WP_HTTP requires it to be a public method.