From 63c1c81cc9cf4522967443a497eca44368e7b8a1 Mon Sep 17 00:00:00 2001 From: gonzalo Date: Thu, 2 Aug 2018 11:32:08 -0300 Subject: [PATCH] fix #15 --- composer.json | 2 +- src/Mailchimp.php | 2 +- src/Mailchimp/Exceptions.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 9cbdd11..2e00943 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "ebizmarts/mailchimp-lib", "type": "library", - "version": "3.0.24", + "version": "3.0.25", "description": "API client library for the MailChimp", "keywords": ["email", "api","mailchimp"], "homepage": "https://github.com/ebizmarts/mailchimp-lib", diff --git a/src/Mailchimp.php b/src/Mailchimp.php index 3a566cf..739913d 100644 --- a/src/Mailchimp.php +++ b/src/Mailchimp.php @@ -219,7 +219,7 @@ public function call($url,$params,$method=Mailchimp::GET) $info = curl_getinfo($ch); if(curl_error($ch)) { - throw new Mailchimp_HttpError("API call to $url failed: " . curl_error($ch)); + throw new Mailchimp_HttpError("API call to $url failed: " . curl_error($ch), $method, $params); } $result = json_decode($response_body, true); diff --git a/src/Mailchimp/Exceptions.php b/src/Mailchimp/Exceptions.php index 04c437b..1efe468 100644 --- a/src/Mailchimp/Exceptions.php +++ b/src/Mailchimp/Exceptions.php @@ -37,7 +37,7 @@ class Mailchimp_Error extends Exception */ protected $params; - public function __construct($url,$method,$params,$title,$detail,$errors) + public function __construct($url,$method='',$params='',$title='',$detail='',$errors=null) { $titleComplete = $title . " for Api Call: " . $url; parent::__construct($titleComplete . " - " . $detail);