Skip to content

Commit

Permalink
Returning success for empty response bodies (e.g. deletion)
Browse files Browse the repository at this point in the history
  • Loading branch information
drewm committed Feb 16, 2018
1 parent 15a5b45 commit f532fa2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/MailChimp.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* This wrapper: https://github.com/drewm/mailchimp-api
*
* @author Drew McLellan <drew.mclellan@gmail.com>
* @version 2.4
* @version 2.5
*/
class MailChimp
{
Expand Down Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit f532fa2

Please # to comment.