From: Brian Wolff Date: Fri, 24 Jul 2015 13:05:57 +0000 (-0600) Subject: The http-invalid-url message has a parameter, so send it X-Git-Tag: 1.31.0-rc.0~10658^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22suivi_revisions%22%29%20.%20%22?a=commitdiff_plain;h=e47982e128402689c9cafcf97df7f1af75232fed;p=lhc%2Fweb%2Fwiklou.git The http-invalid-url message has a parameter, so send it Currently was outputting raw $1 to user. Change-Id: If1d10270f4d446c4d1703457903034e8356c1503 --- diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index 825cd064e8..7b43a2d01c 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -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 } diff --git a/includes/upload/UploadFromUrl.php b/includes/upload/UploadFromUrl.php index 4c099b3d42..f57874512c 100644 --- a/includes/upload/UploadFromUrl.php +++ b/includes/upload/UploadFromUrl.php @@ -195,7 +195,7 @@ class UploadFromUrl extends UploadBase { */ public function fetchFile( $httpOptions = array() ) { if ( !Http::isValidURI( $this->mUrl ) ) { - return Status::newFatal( 'http-invalid-url' ); + return Status::newFatal( 'http-invalid-url', $this->mUrl ); } if ( !self::isAllowedHost( $this->mUrl ) ) {