Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.

Commit 5c986ef

Browse files
author
Fosco Marotto
committed
Merge pull request #125 from itsgoingd/fix-build-query
Explicitly set arg separator to "&" in http_build_query calls.
2 parents 487e623 + fc0ab20 commit 5c986ef

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Facebook/FacebookRedirectLoginHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function getLoginUrl($scope = array(), $version = null)
100100
'scope' => implode(',', $scope)
101101
);
102102
return 'https://www.facebook.com/' . $version . '/dialog/oauth?' .
103-
http_build_query($params);
103+
http_build_query($params, null, '&');
104104
}
105105

106106
/**
@@ -118,7 +118,7 @@ public function getLogoutUrl(FacebookSession $session, $next)
118118
'next' => $next,
119119
'access_token' => $session->getToken()
120120
);
121-
return 'https://www.facebook.com/logout.php?' . http_build_query($params);
121+
return 'https://www.facebook.com/logout.php?' . http_build_query($params, null, '&');
122122
}
123123

124124
/**

src/Facebook/FacebookRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ public static function appendParamsToUrl($url, $params = array())
298298
}
299299

300300
if (strpos($url, '?') === false) {
301-
return $url . '?' . http_build_query($params);
301+
return $url . '?' . http_build_query($params, null, '&');
302302
}
303303

304304
list($path, $query_string) = explode('?', $url, 2);
@@ -307,7 +307,7 @@ public static function appendParamsToUrl($url, $params = array())
307307
// Favor params from the original URL over $params
308308
$params = array_merge($params, $query_array);
309309

310-
return $path . '?' . http_build_query($params);
310+
return $path . '?' . http_build_query($params, null, '&');
311311
}
312312

313313
}

src/Facebook/HttpClients/FacebookStreamHttpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public function send($url, $method = 'GET', $parameters = array())
112112
);
113113

114114
if ($parameters) {
115-
$options['http']['content'] = http_build_query($parameters);
115+
$options['http']['content'] = http_build_query($parameters, null, '&');
116116

117117
$this->addRequestHeader('Content-type', 'application/x-www-form-urlencoded');
118118
}

0 commit comments

Comments
 (0)