From 92fde0505f8127dd182909e58bd5f96376762700 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sun, 20 Mar 2005 03:59:06 +0000 Subject: [PATCH] Fixed warning due to default timestamp from Article being passed to wfTimestamp Warning was: gmmktime(): Windows does not support negative values for this function in c:\\htdocs\\w\\includes\\GlobalFunctions.php on line 1017 --- includes/OutputPage.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 641d3770d6..fee9e5eb41 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -86,7 +86,10 @@ class OutputPage { */ function checkLastModified ( $timestamp ) { global $wgLang, $wgCachePages, $wgUser; - $timestamp=wfTimestamp(TS_MW,$timestamp); + if ( !$timestamp || $timestamp == '19700101000000' ) { + wfDebug( "CACHE DISABLED, NO TIMESTAMP\n" ); + return; + } if( !$wgCachePages ) { wfDebug( "CACHE DISABLED\n", false ); return; @@ -96,6 +99,7 @@ class OutputPage { return; } + $timestamp=wfTimestamp(TS_MW,$timestamp); $lastmod = wfTimestamp( TS_RFC2822, max( $timestamp, $wgUser->mTouched ) ); if( !empty( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ) ) { -- 2.20.1