Use Title, not IContextSource; remove createArticle, etc.
[lhc/web/wiklou.git] / includes / Title.php
index 880c95f..1681c4a 100644 (file)
@@ -2857,8 +2857,12 @@ class Title {
                if ( !$this->getArticleID( $flags ) ) {
                        return $this->mRedirect = false;
                }
+
                $linkCache = LinkCache::singleton();
-               $this->mRedirect = (bool)$linkCache->getGoodLinkFieldObj( $this, 'redirect' );
+               $cached = $linkCache->getGoodLinkFieldObj( $this, 'redirect' );
+               assert( $cached !== null ); # assert the assumption that the cache actually knows about this title
+
+               $this->mRedirect = (bool)$cached;
 
                return $this->mRedirect;
        }