Committed a bunch of live hacks from Wikimedia servers
[lhc/web/wiklou.git] / includes / SpecialShortpages.php
index d8e13c7..34b3505 100644 (file)
@@ -65,6 +65,9 @@ class ShortPagesPage extends QueryPage {
                $dm = $wgContLang->getDirMark();
                
                $title = Title::makeTitleSafe( $result->namespace, $result->title );
+               if ( !$title ) {
+                       return '<!-- Invalid title ' .  htmlspecialchars( "{$result->namespace}:{$result->title}" ). '-->';
+               }
                $hlink = $skin->makeKnownLinkObj( $title, wfMsgHtml( 'hist' ), 'action=history' );
                $plink = $this->isCached()
                                        ? $skin->makeLinkObj( $title )