Merge "Fix EnhancedChangesList::getDiffHistLinks null exception"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sun, 21 May 2017 12:28:57 +0000 (12:28 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sun, 21 May 2017 12:28:57 +0000 (12:28 +0000)
1  2 
includes/changes/EnhancedChangesList.php

@@@ -32,11 -32,6 +32,11 @@@ class EnhancedChangesList extends Chang
         */
        protected $rc_cache;
  
 +      /**
 +       * @var TemplateParser
 +       */
 +      protected $templateParser;
 +
        /**
         * @param IContextSource|Skin $obj
         * @param array $filterGroups Array of ChangesListFilterGroup objects (currently optional)
@@@ -63,7 -58,6 +63,7 @@@
                        $this->message,
                        $this->linkRenderer
                );
 +              $this->templateParser = new TemplateParser();
        }
  
        /**
  
                $this->rcCacheIndex++;
  
 -              $templateParser = new TemplateParser();
 -              return $templateParser->processTemplate(
 +              return $this->templateParser->processTemplate(
                        'EnhancedChangesListGroup',
                        $templateParams
                );
                if ( $rc->getAttribute( 'rc_type' ) == RC_CATEGORIZE ) {
                        // For categorizations we must swap the category title with the page title!
                        $pageTitle = Title::newFromID( $rc->getAttribute( 'rc_cur_id' ) );
+                       if ( !$pageTitle ) {
+                               // The page has been deleted, but the RC entry
+                               // deletion job has not run yet. Just skip.
+                               return '';
+                       }
                }
  
                $retVal = ' ' . $this->msg( 'parentheses' )