Skip to content

Commit 5b33131

Browse files
committed
Merge pull request #1 from patrickli/php53-compatibility
Make the code compatible with php 5.3
2 parents fdbdc28 + b4b324a commit 5b33131

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/http_build_url.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@
5757
* composed url like parse_url() would return
5858
* @return string
5959
*/
60-
function http_build_url($url, $parts = [], $flags = HTTP_URL_REPLACE, &$new_url = [])
60+
function http_build_url($url, $parts = array(), $flags = HTTP_URL_REPLACE, &$new_url = array())
6161
{
62-
$keys = ['user', 'pass', 'port', 'path', 'query', 'fragment'];
62+
$keys = array('user', 'pass', 'port', 'path', 'query', 'fragment');
6363
$url = parse_url($url);
6464

6565
// HTTP_URL_STRIP_ALL and HTTP_URL_STRIP_AUTH cover several other flags.
@@ -72,7 +72,7 @@ function http_build_url($url, $parts = [], $flags = HTTP_URL_REPLACE, &$new_url
7272
}
7373

7474
// Schema and host are alwasy replaced
75-
foreach (['scheme', 'host'] as $part) {
75+
foreach (array('scheme', 'host') as $part) {
7676
if (isset($parts[$part])) {
7777
$url[$part] = $parts[$part];
7878
}

0 commit comments

Comments
 (0)