From 9e892c7fd845455576b298f10ddec8b479cb742c Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Fri, 16 Dec 2011 20:55:54 +0000 Subject: [PATCH] Per Aaron, fix for r105764: only set the timestamp if it's set in the cached ParserOutput object --- includes/Article.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index f2fb262c5f..7ed28e6b02 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -499,8 +499,12 @@ class Article extends Page { # the correct version information. $wgOut->setRevisionId( $this->mPage->getLatest() ); # Preload timestamp to avoid a DB hit - $wgOut->setRevisionTimestamp( $this->mParserOutput->getTimestamp() ); - $this->mPage->setTimestamp( $this->mParserOutput->getTimestamp() ); + $cachedTimestamp = $this->mParserOutput->getTimestamp(); + var_dump( $cachedTimestamp ); + if ( $cachedTimestamp !== null ) { + $wgOut->setRevisionTimestamp( $cachedTimestamp ); + $this->mPage->setTimestamp( $cachedTimestamp ); + } $outputDone = true; } } -- 2.20.1