Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#21121 closed enhancement (maybelater)

Remove _http_build_query compatibility function

Reported by: kurtpayne's profile 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 12 years ago.
Deprecate _http_build_query

Download all attachments as: .zip

Change History (4)

@kurtpayne
12 years ago

Deprecate _http_build_query

#1 follow-up: @dd32
12 years 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 rather 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.

Last edited 12 years ago by dd32 (previous) (diff)

#2 in reply to: ↑ 1 @kurtpayne
12 years 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.

#3 @dd32
12 years 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.