From ddc817560cbb2a94fd203310ad617e9ae442d25c Mon Sep 17 00:00:00 2001 From: umherirrender Date: Mon, 11 Feb 2013 16:59:30 +0100 Subject: [PATCH] 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 --- includes/Title.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.20.1