summaryrefslogtreecommitdiff
path: root/vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php')
-rw-r--r--vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php b/vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php
index d0dbdb695..3401b57b8 100644
--- a/vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php
+++ b/vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php
@@ -8,8 +8,8 @@ class CurlException extends \Exception implements SafeExceptionInterface
/**
* @param \CurlHandle $ch
*/
- public static function createFromPhpError($ch): self
+ public static function createFromPhpError($ch = null): self
{
- return new self(\curl_error($ch), \curl_errno($ch));
+ return new self($ch ? \curl_error($ch) : '', $ch ? \curl_errno($ch) : 0);
}
}