We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent af8a76c commit 930245bCopy full SHA for 930245b
1 file changed
src/Delivery/NovaPoshtaApi2.php
@@ -192,7 +192,7 @@ private function prepare($data)
192
? $data
193
: json_decode($data, true);
194
// If error exists, throw Exception
195
- if ($this->throwErrors and array_key_exists('errors', $result)) {
+ if ($this->throwErrors and array_key_exists('errors', $result) and $result['errors']) {
196
throw new \Exception(is_array($result['errors']) ? implode("\n", $result['errors']) : $result['errors']);
197
}
198
return $result;
0 commit comments