|
|
@@ -71,7 +71,7 @@ class FindBoxCoreSystem
|
|
|
*/
|
|
|
public function CallAPI(string $URI, string $Parameters, bool $skipResponse = false): array
|
|
|
{
|
|
|
- $bodyJSON = "{}";
|
|
|
+ $bodyJSON = null;
|
|
|
$auth = "Authorization: Basic " . base64_encode("{$this->Key}:{$this->Pass}") . "\r\n";
|
|
|
|
|
|
$streamfbOS = @stream_socket_client("tcp://{$this->Host}:{$this->Port}", $errno, $errstr, 1);
|
|
|
@@ -89,6 +89,9 @@ class FindBoxCoreSystem
|
|
|
}
|
|
|
fclose($streamfbOS);
|
|
|
}
|
|
|
+
|
|
|
+ $bodyJSON = ($bodyJSON == null) ? "{}" : $bodyJSON;
|
|
|
+
|
|
|
return $this->returnCode(0, $bodyJSON);
|
|
|
}
|
|
|
|