From 07fcf9909f359b239825787f501e19acbea65a88 Mon Sep 17 00:00:00 2001 From: Brian Wolff Date: Fri, 19 May 2017 22:08:14 +0000 Subject: [PATCH] Fix EnhancedChangesList::getDiffHistLinks null exception If a page is deleted, rc_cur_id is missing, but it takes a while before job queue deletes RC entries. If we encounter something like that, just skip it since its bound for deletion anyways. Bug: T164059 Change-Id: I286109a9707e54939c0da31656ef54fd29acf481 --- includes/changes/EnhancedChangesList.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/changes/EnhancedChangesList.php b/includes/changes/EnhancedChangesList.php index b8a2ac8575..7e59882aa0 100644 --- a/includes/changes/EnhancedChangesList.php +++ b/includes/changes/EnhancedChangesList.php @@ -712,6 +712,11 @@ class EnhancedChangesList extends ChangesList { 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' ) -- 2.20.1