WordPress.org

Make WordPress Core

#21121 closed enhancement (maybelater)

Remove _http_build_query compatibility function

Reported by: kurtpayne Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: HTTP API Keywords: close
Focuses: Cc:

Description

WordPress requires PHP 5.2.4+ which includes http_build_query(). http_build_query() is already used in update.php and class-http.php. We should remove the compatibility function and be more consistent.

Attachments (1)

21121.diff (1.6 KB) - added by kurtpayne 22 months ago.
Deprecate _http_build_query

Download all attachments as: .zip

Change History (4)

kurtpayne22 months ago

Deprecate _http_build_query

comment:1 follow-up: dd3222 months ago

Although this function started out life as a compatibility function.. It's got some non-php-core functionality in it, which is why it's been used directly than through a compat wrapper.

Specifically, the PHP version doesn't support the final parameter, $urlencode, which core uses to produce url's usable for Location headers (IIRC) amongst other things.

Version 0, edited 22 months ago by dd32 (next)

comment:2 in reply to: ↑ 1 kurtpayne22 months ago

  • Keywords close added; dev-feedback removed

Replying to dd32:

Specifically, the PHP version doesn't support the final parameter, $urlencode, which core uses to produce url's usable for Location headers (IIRC) amongst other things.

In PHP 5.4, there's an $enc_type parameter. Probably best to leave this function in until WordPress requires php 5.4.

comment:3 dd3222 months ago

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

I agree with leaving it alone for now.

Note: See TracTickets for help on using tickets.