From: Brian Wolff Date: Fri, 19 May 2017 22:08:14 +0000 (+0000) Subject: Fix EnhancedChangesList::getDiffHistLinks null exception X-Git-Tag: 1.31.0-rc.0~3197^2 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=07fcf9909f359b239825787f501e19acbea65a88;p=lhc%2Fweb%2Fwiklou.git 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 --- 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' )