From 9b9bbdeb4cf7b8bbd3856f190b13a43126cd7ffd Mon Sep 17 00:00:00 2001 From: Tom Scott Date: Tue, 26 Mar 2024 11:02:11 -0700 Subject: [PATCH] Fix broken restful call params override --- src/Infusionsoft/Infusionsoft.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Infusionsoft/Infusionsoft.php b/src/Infusionsoft/Infusionsoft.php index a55a59a..e241290 100644 --- a/src/Infusionsoft/Infusionsoft.php +++ b/src/Infusionsoft/Infusionsoft.php @@ -511,16 +511,14 @@ public function restfulRequest($method, $url, $params = array()) { // Before making the request, we can make sure that the token is still // valid by doing a check on the end of life. - $token = $this->getToken(); if ($this->authenticationType === AuthenticationType::OAuth2AccessToken && $this->isTokenExpired()) { throw new TokenExpiredException; } - $client = $this->getHttpClient(); - $params = []; + $client = $this->getHttpClient(); if (strtolower($method) === 'get' || strtolower($method) === 'delete') { - $url = $url . '?' . http_build_query($params); + $url = $url . '?' . http_build_query($params); } else { $params['body'] = json_encode($params); }