X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fhttp%2FCurlHttpRequest.php;h=5130e36fb5c2f65ec049b0575b04920fef0e51cc;hb=8d9d8c8bb319482919d3d62732b9a0f689ede052;hp=8ef9cc226be2d009a38a29361de1d66949ed754f;hpb=2b14cc0096de48b4863ea7daee55951701f6dc99;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