diff --git a/composer.json b/composer.json index c4f6bdd..e544110 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "kakadu-dev/php-ijson-microservices", - "version": "1.1.1", + "version": "1.1.2", "description": "Package for create microservice architecture based on PHP.", "homepage": "https://github.com/kakadu-dev/php-ijson-microservices", "type": "library", diff --git a/src/Microservice.php b/src/Microservice.php index 4b76e6b..2ff2ca3 100644 --- a/src/Microservice.php +++ b/src/Microservice.php @@ -157,7 +157,7 @@ public function sendServiceRequest(string $service, string $method, $data, bool throw new MicroserviceException($response['error']['message'] ?? 'Unknown error.'); } - return new MjResponse($response); + return new MjResponse($response ?? []); } catch (BadResponseException $exception) { $errMessage = $exception->getMessage(); $errStatus = 4;