Skip to content

Commit 5686f76

Browse files
authored
Merge pull request #36 from maxcxam/patch-1
Update NovaPoshtaApi2.php
2 parents 4434901 + 30de729 commit 5686f76

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Delivery/NovaPoshtaApi2.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ private function prepare($data)
190190
? $data
191191
: json_decode($data, 1);
192192
// If error exists, throw Exception
193-
if ($this->throwErrors and $result['errors']) {
193+
if ($this->throwErrors and array_key_exists('errors', $result)) {
194194
throw new \Exception(is_array($result['errors']) ? implode("\n", $result['errors']) : $result['errors']);
195195
}
196196
return $result;

0 commit comments

Comments
 (0)