X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=blobdiff_plain;f=includes%2Fhttp%2FCurlHttpRequest.php;h=5130e36fb5c2f65ec049b0575b04920fef0e51cc;hb=28d9e60182f33c507147f48b15566c653b890a3c;hp=8ef9cc226be2d009a38a29361de1d66949ed754f;hpb=83ec9c66498ced5c95f52de4fd0ad54b0546b116;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/http/CurlHttpRequest.php b/includes/http/CurlHttpRequest.php index 8ef9cc226b..5130e36fb5 100644 --- a/includes/http/CurlHttpRequest.php +++ b/includes/http/CurlHttpRequest.php @@ -27,6 +27,18 @@ class CurlHttpRequest extends MWHttpRequest { protected $curlOptions = []; protected $headerText = ""; + /** + * @throws RuntimeException + */ + public function __construct() { + if ( !function_exists( 'curl_init' ) ) { + throw new RuntimeException( + __METHOD__ . ': curl (https://www.php.net/curl) is not installed' ); + } + + parent::__construct( ...func_get_args() ); + } + /** * @param resource $fh * @param string $content