remove exception, introduced with content handler merge
authoraude <aude.wiki@gmail.com>
Thu, 11 Oct 2012 12:14:40 +0000 (12:14 +0000)
committeraude <aude.wiki@gmail.com>
Thu, 11 Oct 2012 12:14:40 +0000 (12:14 +0000)
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

index 3212f54..cb0a13f 100644 (file)
@@ -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;