Skip to content

Commit f532fa2

Browse files
committed
Returning success for empty response bodies (e.g. deletion)
1 parent 15a5b45 commit f532fa2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/MailChimp.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* This wrapper: https://github.com/drewm/mailchimp-api
99
*
1010
* @author Drew McLellan <[email protected]>
11-
* @version 2.4
11+
* @version 2.5
1212
*/
1313
class MailChimp
1414
{
@@ -273,9 +273,9 @@ private function makeRequest($http_verb, $method, $args = array(), $timeout = se
273273

274274
curl_close($ch);
275275

276-
$this->determineSuccess($response, $formattedResponse, $timeout);
276+
$isSuccess = $this->determineSuccess($response, $formattedResponse, $timeout);
277277

278-
return $formattedResponse;
278+
return is_array($formattedResponse) ? $formattedResponse : $isSuccess;
279279
}
280280

281281
/**

0 commit comments

Comments
 (0)