From: Tim Starling Date: Sun, 20 Mar 2005 03:59:06 +0000 (+0000) Subject: Fixed warning due to default timestamp from Article being passed to wfTimestamp X-Git-Tag: 1.5.0alpha1~566 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=92fde0505f8127dd182909e58bd5f96376762700;p=lhc%2Fweb%2Fwiklou.git 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 --- 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'] ) ) {