Special:PageLanguage: Show log extract only when title known
authorumherirrender <umherirrender_de.wp@web.de>
Sat, 23 May 2015 19:41:01 +0000 (21:41 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Sat, 23 May 2015 19:41:01 +0000 (21:41 +0200)
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

index 79b2444..9476819 100644 (file)
@@ -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() {