From 79f645c1d9732625950b4afa5e12c907f651693f Mon Sep 17 00:00:00 2001 From: Steven Hughes Date: Wed, 4 May 2022 09:57:53 +0100 Subject: [PATCH] Response.php: Fix GET param name in generated URL Updated the call to http_build_query to include $numeric_prefix = '', and $separator = '&' This minor change fixes the issue where the get parameters name becomes 'amp;keyname' in $_GET instead of 'keyname' --- src/OAuth2/Response.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OAuth2/Response.php b/src/OAuth2/Response.php index 88c1ad5f7..85960b055 100644 --- a/src/OAuth2/Response.php +++ b/src/OAuth2/Response.php @@ -367,7 +367,7 @@ public function setRedirect($statusCode, $url, $state = null, $error = null, $er // add parameters to URL redirection $parts = parse_url($url); $sep = isset($parts['query']) && !empty($parts['query']) ? '&' : '?'; - $url .= $sep . http_build_query($this->parameters); + $url .= $sep . http_build_query($this->parameters, '', '&'); } $this->addHttpHeaders(array('Location' => $url));