jenkins-bot has submitted this change and it was merged.
Change subject: Fix check of return value from SpecialPageFactory::resolveAlias
......................................................................
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
---
M includes/Title.php
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
IAlex: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/Title.php b/includes/Title.php
index e0585f1..b11d8c1 100644
--- a/includes/Title.php
+++ b/includes/Title.php
@@ -2146,7 +2146,7 @@
# 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;
--
To view, visit https://gerrit.wikimedia.org/r/48361
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8def9dd88ebfbe9fcf1ba8f9cae9e25039ec77ed
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
Gerrit-Reviewer: IAlex <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits