bug 42649 - PHP Fatal error: Call to a member function isLocal() on a non-object...
authorReedy <reedy@wikimedia.org>
Mon, 8 Apr 2013 22:29:57 +0000 (23:29 +0100)
committerReedy <reedy@wikimedia.org>
Mon, 8 Apr 2013 22:29:57 +0000 (23:29 +0100)
Change-Id: Ie6027c818785b12f6be9c47caab77ffa4a587a79

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;
        }
 
        /**