From e47982e128402689c9cafcf97df7f1af75232fed Mon Sep 17 00:00:00 2001 From: Brian Wolff Date: Fri, 24 Jul 2015 07:05:57 -0600 Subject: [PATCH] The http-invalid-url message has a parameter, so send it Currently was outputting raw $1 to user. Change-Id: If1d10270f4d446c4d1703457903034e8356c1503 --- includes/HttpFunctions.php | 2 +- includes/upload/UploadFromUrl.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 ) ) { -- 2.20.1