Added a bit defensive programming, as suggested by Aaron in r97040
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Wed, 14 Sep 2011 10:39:58 +0000 (10:39 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Wed, 14 Sep 2011 10:39:58 +0000 (10:39 +0000)
includes/logging/LogFormatter.php

index 0cbcc69..48ba4e7 100644 (file)
@@ -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;