We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d55393d commit 56f9732Copy full SHA for 56f9732
src/Picqer/Carriers/SendCloud/Connection.php
@@ -183,6 +183,10 @@ public function parseResponse(Response $response)
183
try {
184
$resultArray = json_decode($response->getBody()->getContents(), true);
185
186
+ if (! is_array($resultArray)) {
187
+ throw new SendCloudApiException('SendCloud error: Unexpected result: ' . $response->getBody()->getContents());
188
+ }
189
+
190
if (array_key_exists('error', $resultArray)
191
&& is_array($resultArray['error'])
192
&& array_key_exists('message', $resultArray['error'])
0 commit comments