From 5d62d69421091c43f087cb7fe387692865c5355a Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sat, 23 May 2015 21:41:01 +0200 Subject: [PATCH] Special:PageLanguage: Show log extract only when title known When open Special:PageLanguage without a page, the whole pagelang log is shown and the notice: Title::newFromText: $text must be a string. This will throw an InvalidArgumentException in future. [Called from LogPager::limitTitle] The whole log is useless at this position, so showing it only when looking at a specific page. Change-Id: I2a0b7ccc71789506554617e1d12797e72835a12a --- includes/specials/SpecialPageLanguage.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/specials/SpecialPageLanguage.php b/includes/specials/SpecialPageLanguage.php index 79b2444ea9..94768190f6 100644 --- a/includes/specials/SpecialPageLanguage.php +++ b/includes/specials/SpecialPageLanguage.php @@ -87,7 +87,10 @@ class SpecialPageLanguage extends FormSpecialPage { } protected function postText() { - return $this->showLogFragment( $this->par ); + if ( $this->par ) { + return $this->showLogFragment( $this->par ); + } + return ''; } protected function getDisplayFormat() { -- 2.20.1