Make WordPress Core

Opened 14 years ago

Closed 11 years ago

#13452 closed defect (bug) (wontfix)

Use http_build_query compat function

Reported by: simonwheatley's profile simonwheatley 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)

use http_build_query in WP_Http.diff (903 bytes) - added by simonwheatley 14 years ago.
use http_build_query.diff (1.0 KB) - added by simonwheatley 14 years ago.
13452.diff (1.6 KB) - added by wonderboymusic 11 years ago.

Download all attachments as: .zip

Change History (10)

#1 @dd32
14 years ago

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..

#2 @nacin
14 years ago

  • Milestone changed from Awaiting Review to 3.1

#3 @nacin
13 years ago

  • Keywords 3.2-early added; dev-feedback removed
  • Milestone changed from 3.1 to Future Release

#4 @wonderboymusic
11 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 @dd32
11 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.

#6 @ocean90
11 years ago

  • Milestone changed from 3.6 to Awaiting Review

#7 @wonderboymusic
11 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

as per dd32

Note: See TracTickets for help on using tickets.