Fix exception when viewing special pages with relative related titles
[lhc/web/wiklou.git] / includes / skins / Skin.php
index 918c761..bbad648 100644 (file)
@@ -275,7 +275,7 @@ abstract class Skin extends ContextSource {
 
                // Check, if the page can hold some kind of content, otherwise do nothing
                $title = $this->getRelevantTitle();
-               if ( $title->canExist() ) {
+               if ( $title->canExist() && $title->canHaveTalkPage() ) {
                        if ( $title->isTalkPage() ) {
                                $titles[] = $title->getSubjectPage();
                        } else {