From 97bbe1a465e02e99334be00e9df4aac06836b4f2 Mon Sep 17 00:00:00 2001 From: Matej Baco Date: Wed, 23 Nov 2022 09:45:06 +0100 Subject: [PATCH] Bug fix --- src/Executor/Executor.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Executor/Executor.php b/src/Executor/Executor.php index b8b1e8b4bf..43b2228e1f 100644 --- a/src/Executor/Executor.php +++ b/src/Executor/Executor.php @@ -94,7 +94,7 @@ class Executor $status = $response['headers']['status-code']; if ($status >= 400) { - $message = \is_string($response['body'] ? $response['body'] : $response['body']['message']); + $message = \is_string($response['body']) ? $response['body'] : $response['body']['message']; throw new \Exception($message, $status); } @@ -147,7 +147,7 @@ class Executor $status = $response['headers']['status-code']; if ($status >= 400) { - $message = \is_string($response['body'] ? $response['body'] : $response['body']['message']); + $message = \is_string($response['body']) ? $response['body'] : $response['body']['message']; throw new \Exception($message, $status); }