From c0757da91c9cba1b16fef5a2af2ecbf264e7f295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9C=D0=B5=D0=BB?= =?UTF-8?q?=D0=B8=D1=85=D0=BE=D0=B2?= Date: Fri, 27 Oct 2023 18:04:38 +0300 Subject: [PATCH] Update http_build_query calls according to php 8.1 --- src/Authentication/OAuth2Client.php | 2 +- src/Helper/RedirectLoginHelper.php | 2 +- src/Http/RequestBodyMultipart.php | 2 +- src/Url/UrlManipulator.php | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Authentication/OAuth2Client.php b/src/Authentication/OAuth2Client.php index ff67b6c17..55c82e336 100644 --- a/src/Authentication/OAuth2Client.php +++ b/src/Authentication/OAuth2Client.php @@ -138,7 +138,7 @@ public function getAuthorizationUrl($redirectUrl, $state, array $scope = [], arr 'scope' => implode(',', $scope), ]; - return static::BASE_AUTHORIZATION_URL.'/'.$this->graphVersion.'/dialog/oauth?'.http_build_query($params, null, $separator); + return static::BASE_AUTHORIZATION_URL.'/'.$this->graphVersion.'/dialog/oauth?'.http_build_query($params, '', $separator); } /** diff --git a/src/Helper/RedirectLoginHelper.php b/src/Helper/RedirectLoginHelper.php index 0f762d54a..515b48102 100644 --- a/src/Helper/RedirectLoginHelper.php +++ b/src/Helper/RedirectLoginHelper.php @@ -149,7 +149,7 @@ public function getLogoutUrl($accessToken, $next, $separator = '&') 'access_token' => $accessToken->getValue(), ]; - return 'https://www.facebook.com/logout.php?'.http_build_query($params, null, $separator); + return 'https://www.facebook.com/logout.php?'.http_build_query($params, '', $separator); } /** diff --git a/src/Http/RequestBodyMultipart.php b/src/Http/RequestBodyMultipart.php index 829d4187d..0460d324e 100644 --- a/src/Http/RequestBodyMultipart.php +++ b/src/Http/RequestBodyMultipart.php @@ -141,7 +141,7 @@ private function getParamString($name, $value) */ private function getNestedParams(array $params) { - $query = http_build_query($params, null, '&'); + $query = http_build_query($params, '', '&'); $params = explode('&', $query); $result = []; diff --git a/src/Url/UrlManipulator.php b/src/Url/UrlManipulator.php index ce199dcd3..cdb10eecd 100644 --- a/src/Url/UrlManipulator.php +++ b/src/Url/UrlManipulator.php @@ -48,7 +48,7 @@ public static function removeParamsFromUrl($url, array $paramsToFilter) } if (count($params) > 0) { - $query = '?'.http_build_query($params, null, '&'); + $query = '?'.http_build_query($params, '', '&'); } } @@ -76,7 +76,7 @@ public static function appendParamsToUrl($url, array $newParams = []) } if (strpos($url, '?') === false) { - return $url.'?'.http_build_query($newParams, null, '&'); + return $url.'?'.http_build_query($newParams, '', '&'); } list($path, $query) = explode('?', $url, 2); @@ -89,7 +89,7 @@ public static function appendParamsToUrl($url, array $newParams = []) // Sort for a predicable order ksort($newParams); - return $path.'?'.http_build_query($newParams, null, '&'); + return $path.'?'.http_build_query($newParams, '', '&'); } /**