mirror of
https://github.com/kevachat/kevacoin-php.git
synced 2025-01-22 12:34:15 +00:00
fix errors
This commit is contained in:
parent
95a195d67c
commit
a87af9f6df
@ -71,7 +71,7 @@ class Client
|
|||||||
{
|
{
|
||||||
curl_setopt(
|
curl_setopt(
|
||||||
$this->_curl,
|
$this->_curl,
|
||||||
CURLOPT_data,
|
CURLOPT_POSTFIELDS,
|
||||||
json_encode(
|
json_encode(
|
||||||
$data
|
$data
|
||||||
)
|
)
|
||||||
@ -81,7 +81,7 @@ class Client
|
|||||||
|
|
||||||
private function _execute(
|
private function _execute(
|
||||||
bool $json = true
|
bool $json = true
|
||||||
): ?string
|
): ?array
|
||||||
{
|
{
|
||||||
$response = curl_exec(
|
$response = curl_exec(
|
||||||
$this->_curl
|
$this->_curl
|
||||||
@ -97,7 +97,7 @@ class Client
|
|||||||
|
|
||||||
if ($response)
|
if ($response)
|
||||||
{
|
{
|
||||||
return $json ? json_decode($response) : $response;
|
return $json ? json_decode($response, true) : $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user