Merge "The http-invalid-url message has a parameter, so send it"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 24 Jul 2015 18:10:15 +0000 (18:10 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 24 Jul 2015 18:10:15 +0000 (18:10 +0000)
includes/HttpFunctions.php
includes/upload/UploadFromUrl.php

index 825cd06..7b43a2d 100644 (file)
@@ -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
                }
index 4c099b3..f578745 100644 (file)
@@ -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 ) ) {