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

Commit

Permalink
Fix curl exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Parvindersib committed Apr 19, 2017
1 parent b98728d commit b437808
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Sendinblue/Mailin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace Sendinblue;

use Exception;

/**
* SendinBlue REST client
*/
Expand All @@ -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;
Expand All @@ -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
Expand Down

0 comments on commit b437808

Please sign in to comment.