From b437808566f46979309f01b796c31b7b6bacfb42 Mon Sep 17 00:00:00 2001 From: Parvindersib Date: Wed, 19 Apr 2017 18:30:21 +0530 Subject: [PATCH] Fix curl exception --- src/Sendinblue/Mailin.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Sendinblue/Mailin.php b/src/Sendinblue/Mailin.php index c8ce381..da7e434 100644 --- a/src/Sendinblue/Mailin.php +++ b/src/Sendinblue/Mailin.php @@ -2,8 +2,6 @@ namespace Sendinblue; -use Exception; - /** * SendinBlue REST client */ @@ -16,7 +14,7 @@ class Mailin public function __construct($base_url, $api_key, $timeout='') { if (!function_exists('curl_init')) { - throw new Exception('Mailin requires CURL module'); + throw new \Exception('Mailin requires CURL module'); } $this->base_url = $base_url; $this->api_key = $api_key; @@ -33,7 +31,7 @@ private function do_request($resource, $method, $input) $content_header = "Content-Type:application/json"; $timeout = ($this->timeout!='')?($this->timeout):30000; //default timeout: 30 secs if ($timeout!='' && ($timeout <= 0 || $timeout > 60000)) { - throw new Exception('value not allowed for timeout'); + throw new \Exception('value not allowed for timeout'); } if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { // Windows only over-ride