From 3631972140c9892eb6f287abbb0bf3eb81671ee2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Wed, 14 Sep 2011 10:39:58 +0000 Subject: [PATCH] Added a bit defensive programming, as suggested by Aaron in r97040 --- includes/logging/LogFormatter.php | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.20.1