From f532fa26cd6e7d17c9ba40a757d8c6bfee47dace Mon Sep 17 00:00:00 2001 From: drewm Date: Fri, 16 Feb 2018 15:31:05 +0000 Subject: [PATCH] Returning success for empty response bodies (e.g. deletion) --- src/MailChimp.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/MailChimp.php b/src/MailChimp.php index 81849dd..d57551d 100644 --- a/src/MailChimp.php +++ b/src/MailChimp.php @@ -8,7 +8,7 @@ * This wrapper: https://github.com/drewm/mailchimp-api * * @author Drew McLellan - * @version 2.4 + * @version 2.5 */ class MailChimp { @@ -273,9 +273,9 @@ private function makeRequest($http_verb, $method, $args = array(), $timeout = se curl_close($ch); - $this->determineSuccess($response, $formattedResponse, $timeout); + $isSuccess = $this->determineSuccess($response, $formattedResponse, $timeout); - return $formattedResponse; + return is_array($formattedResponse) ? $formattedResponse : $isSuccess; } /**