sanity check
authorTim Starling <tstarling@users.mediawiki.org>
Sun, 11 Sep 2005 12:31:59 +0000 (12:31 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sun, 11 Sep 2005 12:31:59 +0000 (12:31 +0000)
includes/LinkCache.php

index 57903dd..7d19214 100644 (file)
@@ -363,7 +363,11 @@ class LinkBatch {
        }
 
        function addObj( $title ) {
-               $this->add( $title->getNamespace(), $title->getDBkey() );
+               if ( is_object( $title ) ) {
+                       $this->add( $title->getNamespace(), $title->getDBkey() );
+               } else {
+                       wfDebug( "Warning: LinkBatch::addObj got invalid title object\n" );
+               }
        }
 
        function add( $ns, $dbkey ) {