diff --git a/CHANGELOG.md b/CHANGELOG.md index ee6adc3..3eb8a55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 2.0.3 + +* Return in Error handler if no response is set (which happens in case of async calls) + ## 2.0.2 * Fix wrong parameter type for get list merge vars [#13](https://github.com/zf-fr/zfr-mailchimp/pull/13) diff --git a/src/ZfrMailChimp/Client/Listener/ErrorHandlerListener.php b/src/ZfrMailChimp/Client/Listener/ErrorHandlerListener.php index 97d4722..3e087fb 100644 --- a/src/ZfrMailChimp/Client/Listener/ErrorHandlerListener.php +++ b/src/ZfrMailChimp/Client/Listener/ErrorHandlerListener.php @@ -141,8 +141,8 @@ public static function getSubscribedEvents() public function handleError(Event $event) { $response = $event['response']; - - if ($response->getStatusCode() === 200) { + + if (null === $response || $response->getStatusCode() === 200) { return; }