From 844e693a4b66a05e1cb04544c42b94042a3f96ce Mon Sep 17 00:00:00 2001 From: stoppy Date: Thu, 11 Sep 2014 12:01:44 +0200 Subject: [PATCH] Update mailchimp_library.php If no endpoint is specified in config files, if is not checked, $this->api_endpoint will be empty. if(strlen(trim($this->ci->config->item('api_endpoint')))>0){ $this->api_endpoint = $this->ci->config->item('api_endpoint'); } It checks --- libraries/mailchimp_library.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/mailchimp_library.php b/libraries/mailchimp_library.php index 4441bcb..563e54e 100644 --- a/libraries/mailchimp_library.php +++ b/libraries/mailchimp_library.php @@ -24,7 +24,9 @@ function __construct() $this->ci->load->config('mailchimp'); $this->api_key = $this->ci->config->item('api_key'); - $this->api_endpoint = $this->ci->config->item('api_endpoint'); + if(strlen(trim($this->ci->config->item('api_endpoint')))>0){ + $this->api_endpoint = $this->ci->config->item('api_endpoint'); + } list(, $datacentre) = explode('-', $this->api_key); $this->api_endpoint = str_replace('', $datacentre, $this->api_endpoint);