From eec6c4b5ce2e2182ca56c425c24688c64eaa586f Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sun, 11 Sep 2005 12:31:59 +0000 Subject: [PATCH] sanity check --- includes/LinkCache.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/LinkCache.php b/includes/LinkCache.php index 57903ddc38..7d192140fd 100644 --- a/includes/LinkCache.php +++ b/includes/LinkCache.php @@ -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 ) { -- 2.20.1