X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FHttpFunctions.php;h=7b43a2d01c97ff0f3b29ce17a13204085de5b4a3;hb=3368cccde53732c1278f51632e69b9865c4ee6ba;hp=36e06b5e195ad428bb435da6af785381964fd7da;hpb=b15cd2ee45c5d1dbd58ea3df0becedc43a74ed94;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index 36e06b5e19..7b43a2d01c 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -96,7 +96,7 @@ class Http { if ( isset( $args[1] ) && ( is_string( $args[1] ) || is_numeric( $args[1] ) ) ) { // Second was used to be the timeout // And third parameter used to be $options - wfWarn( "Second parameter should not be a timeout." ); + wfWarn( "Second parameter should not be a timeout.", 2 ); $options = isset( $args[2] ) && is_array( $args[2] ) ? $args[2] : array(); $options['timeout'] = $args[1]; @@ -252,7 +252,7 @@ class MWHttpRequest { $this->parsedUrl = wfParseUrl( $this->url ); if ( !$this->parsedUrl || !Http::isValidURI( $this->url ) ) { - $this->status = Status::newFatal( 'http-invalid-url' ); + $this->status = Status::newFatal( 'http-invalid-url', $url ); } else { $this->status = Status::newGood( 100 ); // continue } @@ -792,14 +792,14 @@ class CurlHttpRequest extends MWHttpRequest { } if ( $this->followRedirects && $this->canFollowRedirects() ) { - wfSuppressWarnings(); + MediaWiki\suppressWarnings(); if ( !curl_setopt( $curlHandle, CURLOPT_FOLLOWLOCATION, true ) ) { wfDebug( __METHOD__ . ": Couldn't set CURLOPT_FOLLOWLOCATION. " . "Probably safe_mode or open_basedir is set.\n" ); // Continue the processing. If it were in curl_setopt_array, // processing would have halted on its entry } - wfRestoreWarnings(); + MediaWiki\restoreWarnings(); } if ( $this->profiler ) { @@ -938,9 +938,9 @@ class PhpHttpRequest extends MWHttpRequest { } do { $reqCount++; - wfSuppressWarnings(); + MediaWiki\suppressWarnings(); $fh = fopen( $url, "r", false, $context ); - wfRestoreWarnings(); + MediaWiki\restoreWarnings(); if ( !$fh ) { break;