From: umherirrender Date: Mon, 11 Feb 2013 15:59:30 +0000 (+0100) Subject: Fix check of return value from SpecialPageFactory::resolveAlias X-Git-Tag: 1.31.0-rc.0~20660 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E/404?a=commitdiff_plain;h=ddc817560cbb2a94fd203310ad617e9ae442d25c;p=lhc%2Fweb%2Fwiklou.git Fix check of return value from SpecialPageFactory::resolveAlias Calling SpecialPageFactory::resolveAlias with an invalid special page name, gives an array( null, null ) back, but this part of code checks explicit against !false, which gives always true. Changed the condition to use an (implicit) check, like the other places, where SpecialPageFactory::resolveAlias is called. Change-Id: I8def9dd88ebfbe9fcf1ba8f9cae9e25039ec77ed --- diff --git a/includes/Title.php b/includes/Title.php index e0585f16dd..b11d8c1ad4 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2146,7 +2146,7 @@ class Title { # If it's a special page, ditch the subpage bit and check again $name = $this->getDBkey(); list( $name, /* $subpage */ ) = SpecialPageFactory::resolveAlias( $name ); - if ( $name !== false ) { + if ( $name ) { $pure = SpecialPage::getTitleFor( $name )->getPrefixedText(); if ( in_array( $pure, $wgWhitelistRead, true ) ) { $whitelisted = true;