Merge "ChangesListSpecialPage: Implement two new hooks superseding 4 old ones"
[lhc/web/wiklou.git] / includes / api / ApiFeedRecentChanges.php
index f1c1bf3..9062ad9 100644 (file)
@@ -80,6 +80,10 @@ class ApiFeedRecentChanges extends ApiBase {
        public function getFeedObject( $feedFormat, $specialClass ) {
                if ( $specialClass === 'SpecialRecentchangeslinked' ) {
                        $title = Title::newFromText( $this->params['target'] );
+                       if ( !$title ) {
+                               $this->dieUsageMsg( array( 'invalidtitle', $this->params['target'] ) );
+                       }
+
                        $feed = new ChangesFeed( $feedFormat, false );
                        $feedObj = $feed->getFeedObject(
                                $this->msg( 'recentchangeslinked-title', $title->getPrefixedText() )