Skip to content
This repository was archived by the owner on May 18, 2020. It is now read-only.

Commit b437808

Browse files
committed
Fix curl exception
1 parent b98728d commit b437808

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Sendinblue/Mailin.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace Sendinblue;
44

5-
use Exception;
6-
75
/**
86
* SendinBlue REST client
97
*/
@@ -16,7 +14,7 @@ class Mailin
1614
public function __construct($base_url, $api_key, $timeout='')
1715
{
1816
if (!function_exists('curl_init')) {
19-
throw new Exception('Mailin requires CURL module');
17+
throw new \Exception('Mailin requires CURL module');
2018
}
2119
$this->base_url = $base_url;
2220
$this->api_key = $api_key;
@@ -33,7 +31,7 @@ private function do_request($resource, $method, $input)
3331
$content_header = "Content-Type:application/json";
3432
$timeout = ($this->timeout!='')?($this->timeout):30000; //default timeout: 30 secs
3533
if ($timeout!='' && ($timeout <= 0 || $timeout > 60000)) {
36-
throw new Exception('value not allowed for timeout');
34+
throw new \Exception('value not allowed for timeout');
3735
}
3836
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
3937
// Windows only over-ride

0 commit comments

Comments
 (0)