From 603a1de640de564856a2b3754ad65046248e56dc Mon Sep 17 00:00:00 2001 From: aude Date: Thu, 11 Oct 2012 12:14:40 +0000 Subject: [PATCH] remove exception, introduced with content handler merge There is a bug [1] in the Title::isRedirect() method, when called from Linker, in some cases when the link cache is not aware of a title. The bug should be fixed ASAP. Until then, this removes the exception and maintains same behavior as before the merge. [1] https://bugzilla.wikimedia.org/show_bug.cgi?id=37209 Change-Id: I7874a5ecdd24417108685f811bbc2e6a2d82aa94 --- includes/Title.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index 3212f542cc..cb0a13f19b 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2916,10 +2916,10 @@ class Title { $linkCache = LinkCache::singleton(); $cached = $linkCache->getGoodLinkFieldObj( $this, 'redirect' ); - if ( $cached === null ) { # check the assumption that the cache actually knows about this title - # XXX: this does apparently happen, see https://bugzilla.wikimedia.org/show_bug.cgi?id=37209 - # as a stop gap, perhaps log this, but don't throw an exception? - throw new MWException( "LinkCache doesn't currently know about this title: " . $this->getPrefixedDBkey() ); + if ( $cached === null ) { + // TODO: check the assumption that the cache actually knows about this title + // and handle this, such as get the title from the database. + // See https://bugzilla.wikimedia.org/show_bug.cgi?id=37209 } $this->mRedirect = (bool)$cached; -- 2.20.1