From: Niklas Laxström Date: Wed, 14 Sep 2011 10:39:58 +0000 (+0000) Subject: Added a bit defensive programming, as suggested by Aaron in r97040 X-Git-Tag: 1.31.0-rc.0~27677 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=3631972140c9892eb6f287abbb0bf3eb81671ee2;p=lhc%2Fweb%2Fwiklou.git Added a bit defensive programming, as suggested by Aaron in r97040 --- diff --git a/includes/logging/LogFormatter.php b/includes/logging/LogFormatter.php index 0cbcc69632..48ba4e7a1b 100644 --- a/includes/logging/LogFormatter.php +++ b/includes/logging/LogFormatter.php @@ -211,6 +211,9 @@ class LogFormatter { if ( !$this->plaintext ) { $link = Linker::link( $title, null, array(), $parameters ); } else { + if ( !$title instanceof Title ) { + throw new MWException( "Expected title, got null" ); + } $link = '[[' . $title->getPrefixedText() . ']]'; } return $link;