Opened 15 years ago
Closed 12 years ago
#13452 closed defect (bug) (wontfix)
Use http_build_query compat function
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | General | Keywords: | 3.2-early close |
Focuses: | Cc: |
Description
We now have the compat function http_build_query so should use it rather than _http_build_query wherever possible. The first attached diff (use http_build_query in WP_Http.diff) simplifies WP_Http by removing a conditional, and the second (use http_build_query in WP_Http.diff) switched build_query to use http_build_query rather than _http_build_query.
Relevant: #9044
Attachments (3)
Change History (10)
#3
@
14 years ago
- Keywords 3.2-early added; dev-feedback removed
- Milestone changed from 3.1 to Future Release
#4
@
12 years ago
- Milestone changed from Future Release to 3.6
the WP_Http part was fixed in [17535] - I refreshed the build_query()
part against trunk in 13452.diff
#5
@
12 years ago
- Keywords close added; has-patch removed
_http_build_query() and http_build_query() are not direct replacements of each other, Plus, the 4th arg to http_build_query() was added in PHP 5.4.0.
Above patch won't work, I'm pretty sure this is wontfix as the functions are going to be incompatible.
The 3rd separator argument was added in PHP 5.2.1, in previous versions it may use '&' as the separator. Due to the way those functions are being used, We need to specify it as & to retain complete compatibility.
We could simply use _http_build_query() in class-http.php, but if the core function is available.. might as well use it..