X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=blobdiff_plain;f=includes%2Fhttp%2FCurlHttpRequest.php;h=5130e36fb5c2f65ec049b0575b04920fef0e51cc;hb=4ecf24c6e08edb31b0244229e8da8f9fa9c6068c;hp=8ef9cc226be2d009a38a29361de1d66949ed754f;hpb=a2519903067d8e738a5e24fa279dcf876a793a88;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