Merge "bug 42649 - PHP Fatal error: Call to a member function isLocal() on a non...
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 8 Apr 2013 23:19:55 +0000 (23:19 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 8 Apr 2013 23:19:55 +0000 (23:19 +0000)
includes/Title.php

index 4fbe41e..aa8fb93 100644 (file)
@@ -575,10 +575,12 @@ class Title {
         */
        public function isLocal() {
                if ( $this->mInterwiki != '' ) {
-                       return Interwiki::fetch( $this->mInterwiki )->isLocal();
-               } else {
-                       return true;
+                       $iw = Interwiki::fetch( $this->mInterwiki );
+                       if ( $iw ) {
+                               return $iw->isLocal();
+                       }
                }
+               return true;
        }
 
        /**