From 53daef97bf48a2f00866a17b69c02eed1bb4d0de Mon Sep 17 00:00:00 2001 From: CyberVitexus Date: Wed, 17 Jan 2024 23:54:01 +0100 Subject: [PATCH] #37 Exeption title fix --- src/AbraFlexi/RO.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AbraFlexi/RO.php b/src/AbraFlexi/RO.php index 8cea963..e1bd368 100644 --- a/src/AbraFlexi/RO.php +++ b/src/AbraFlexi/RO.php @@ -1230,7 +1230,7 @@ public function parseResponse($responseDecoded, $responseCode) } if ($this->throwException) { $errors = $this->getErrors(); - throw new Exception(empty($errors) ? 'Problem ' : $errors[0]['message'], $this); + throw new Exception(empty($errors) ? 'Problem ' : (is_array($errors[0]) ? $errors[0]['message'] : $errors[0] ), $this); } else { $this->addStatusMessage($this->lastResponseCode . ': ' . $this->curlInfo['url'] . ' (' . $this->format . ') ' . json_encode($this->getErrors()), 'warning'); }