WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 15 months ago

#13452 closed defect (bug) (wontfix)

Use http_build_query compat function

Reported by: 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 4 years ago.
use http_build_query.diff (1.0 KB) - added by simonwheatley 4 years ago.
13452.diff (1.6 KB) - added by wonderboymusic 15 months ago.

Download all attachments as: .zip

Change History (10)

comment:1 dd324 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..

comment:2 nacin3 years ago

  • Milestone changed from Awaiting Review to 3.1

comment:3 nacin3 years ago

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

wonderboymusic15 months ago

comment:4 wonderboymusic15 months 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

comment:5 dd3215 months 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.

comment:6 ocean9015 months ago

  • Milestone changed from 3.6 to Awaiting Review

comment:7 wonderboymusic15 months 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.