Skip to content

Commit

Permalink
Merge pull request #8 from mazikwyry/mazikwyry-http_build_query_fix
Browse files Browse the repository at this point in the history
http_build_query fix for buggy PHP versions
  • Loading branch information
Kris-B authored Mar 20, 2017
2 parents 2b0fcad + d1a3c8d commit 3fb69e1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dist/admin/tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function get_new_access_token(){
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_VERBOSE, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params, '', '&'));
$response = curl_exec ($ch);
$authObj=json_decode($response);
$msg=curl_error($ch);
Expand Down Expand Up @@ -94,4 +94,4 @@ function write_log( $msg ) {
}


?>
?>
4 changes: 2 additions & 2 deletions dist/authorize.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"scope" => "https://picasaweb.google.com/data profile email"
);

$request_to = OAUTH2_AUTH_URL . '?' . http_build_query($params);
$request_to = OAUTH2_AUTH_URL . '?' . http_build_query($params, '', '&');

header("Location: " . $request_to); // display authorization form
}
Expand All @@ -103,7 +103,7 @@
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_VERBOSE, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params, '', '&'));
$response = curl_exec($ch);
$authObj = json_decode($response);
$info = curl_getinfo($ch);
Expand Down
4 changes: 2 additions & 2 deletions dist/nanogp.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function send_gprequest( $url ) {
$request['access_token']=$atoken;

$ch = curl_init();
$url = $url . '?' . http_build_query($request);
$url = $url . '?' . http_build_query($request, '', '&');
curl_setopt($ch, CURLOPT_URL, $url );
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
Expand Down Expand Up @@ -131,4 +131,4 @@ function send_gprequest( $url ) {



?>
?>

0 comments on commit 3fb69e1

Please sign in to comment.