From a87af9f6df4280dca7a1a811f3ecc8c293bf6e39 Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 5 Dec 2023 01:51:32 +0200 Subject: [PATCH] fix errors --- src/Client.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Client.php b/src/Client.php index 429014b..1186144 100644 --- a/src/Client.php +++ b/src/Client.php @@ -71,7 +71,7 @@ class Client { curl_setopt( $this->_curl, - CURLOPT_data, + CURLOPT_POSTFIELDS, json_encode( $data ) @@ -81,7 +81,7 @@ class Client private function _execute( bool $json = true - ): ?string + ): ?array { $response = curl_exec( $this->_curl @@ -97,7 +97,7 @@ class Client if ($response) { - return $json ? json_decode($response) : $response; + return $json ? json_decode($response, true) : $response; } return null;