Remove trailing spaces from IP addr in Special:DeletedContributions
authorAlangi Derick <alangiderick@gmail.com>
Fri, 5 Oct 2018 14:22:15 +0000 (15:22 +0100)
committerD3r1ck01 <alangiderick@gmail.com>
Fri, 5 Oct 2018 14:55:29 +0000 (14:55 +0000)
* Trim "target" to remove trailing spaces from IP address in
  Special:DeletedContributions that triggers MW internal error.

Bug: T187619
Change-Id: Ic6b0d8020553ecce4dcf97f9c78487d3174444d8

includes/specials/SpecialDeletedContributions.php

index 3f87712..e4672f8 100644 (file)
@@ -73,7 +73,7 @@ class DeletedContributionsPage extends SpecialPage {
 
                $this->mOpts = $opts;
 
-               $target = $opts->getValue( 'target' );
+               $target = trim( $opts->getValue( 'target' ) );
                if ( !strlen( $target ) ) {
                        $this->getForm();