Use as strict comparison to check whether an user name was provided in Special:ListFiles
authorAlexandre Emsenhuber <mediawiki@emsenhuber.ch>
Wed, 27 Aug 2014 20:39:19 +0000 (22:39 +0200)
committerUmherirrender <umherirrender_de.wp@web.de>
Tue, 23 Sep 2014 19:04:30 +0000 (19:04 +0000)
Otherwise Special:ListFiles/0 will not behave as expected.

Change-Id: I1fa503b4b514a471ded798b54e867435d30b80c5

includes/specials/SpecialListfiles.php

index 04a83c8..2a97abc 100644 (file)
@@ -87,7 +87,7 @@ class ImageListPager extends TablePager {
                $this->mIncluding = $including;
                $this->mShowAll = $showAll;
 
-               if ( $userName ) {
+               if ( $userName !== null && $userName !== '' ) {
                        $nt = Title::newFromText( $userName, NS_USER );
                        if ( !is_null( $nt ) ) {
                                $this->mUserName = $nt->getText();