jenkins-bot has submitted this change and it was merged. Change subject: Avoid fatals in Special:History without parameter ......................................................................
Avoid fatals in Special:History without parameter Title is not always set meaning this will explode. Use revision to be safe. Change-Id: I667f7398e0b99c954b9da827945b12edbc0452c1 --- M includes/specials/SpecialHistory.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Kaldari: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialHistory.php b/includes/specials/SpecialHistory.php index b838f56..7fc0224 100644 --- a/includes/specials/SpecialHistory.php +++ b/includes/specials/SpecialHistory.php @@ -4,7 +4,7 @@ const LIMIT = 50; protected $mode = 'beta'; - /** @var Title */ + /** @var Title|null if no title passed */ protected $title; public function __construct() { @@ -91,7 +91,7 @@ if ( $canSeeText && $prev && $prev->userCan( Revision::DELETED_TEXT, $user ) ) { $diffLink = SpecialPage::getTitleFor( 'MobileDiff', $prev->getId() )->getLocalUrl(); } elseif ( $canSeeText ) { - $diffLink = $this->title->getLocalUrl( array( 'oldid' => $rev->getId() ) ); + $diffLink = $rev->getTitle()->getLocalUrl( array( 'oldid' => $rev->getId() ) ); } else { $diffLink = false; } -- To view, visit https://gerrit.wikimedia.org/r/94619 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I667f7398e0b99c954b9da827945b12edbc0452c1 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org> Gerrit-Reviewer: Kaldari <rkald...@wikimedia.org> Gerrit-Reviewer: MaxSem <maxsem.w...@gmail.com> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits