mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-10-21 19:37:49 +00:00
Ensure ErrorExceptions are called from the global namespace
This commit is contained in:
+2
-2
@@ -34,7 +34,7 @@ class Curl {
|
||||
|
||||
public function __construct() {
|
||||
if (!extension_loaded('curl')) {
|
||||
throw new ErrorException('cURL library is not loaded');
|
||||
throw new \ErrorException('cURL library is not loaded');
|
||||
}
|
||||
|
||||
$this->curl = curl_init();
|
||||
@@ -61,7 +61,7 @@ class Curl {
|
||||
|
||||
$curlm_error_code = curl_multi_add_handle($curl_multi, $curl->curl);
|
||||
if (!($curlm_error_code === CURLM_OK)) {
|
||||
throw new ErrorException('cURL multi add handle error: ' .
|
||||
throw new \ErrorException('cURL multi add handle error: ' .
|
||||
curl_multi_strerror($curlm_error_code));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user