Opened 16 years ago
Closed 14 years ago
#13452 closed defect (bug) (wontfix)
Use http_build_query compat function
| Reported by: | simonwheatley | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | |
| Severity: | normal | Keywords: | 3.2-early close |
| Cc: | Focuses: |
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)
#4
@
14 years ago
- Milestone Future Release → 3.6
the WP_Http part was fixed in [17535] - I refreshed the build_query() part against trunk in 13452.diff
#5
@
14 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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..