X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FHttpFunctions.php;h=32f77dcfab41ee5fd492b0f8e776997388790909;hb=0177eab9d7384b474b5e9c69b902b21dfc608520;hp=66b6e729e9245a5b23306a8d2814c1b45fae72de;hpb=e516a54238e0d017ba2f1cf7557dc4411bff6b6a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index 66b6e729e9..32f77dcfab 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -212,7 +212,7 @@ class MWHttpRequest { * @param $url String: url to use. If protocol-relative, will be expanded to an http:// URL * @param $options Array: (optional) extra params to pass (see Http::request()) */ - function __construct( $url, $options = array() ) { + protected function __construct( $url, $options = array() ) { global $wgHTTPTimeout; $this->url = wfExpandUrl( $url, PROTO_HTTP ); @@ -265,6 +265,7 @@ class MWHttpRequest { * Generate a new request object * @param $url String: url to use * @param $options Array: (optional) extra params to pass (see Http::request()) + * @throws MWException * @return CurlHttpRequest|PhpHttpRequest * @see MWHttpRequest::__construct */ @@ -393,6 +394,7 @@ class MWHttpRequest { * will be aborted. * * @param $callback Callback + * @throws MWException */ public function setCallback( $callback ) { if ( !is_callable( $callback ) ) {