# this breaks strtotime().
$modsince = preg_replace( '/;.*$/', '', $_SERVER["HTTP_IF_MODIFIED_SINCE"] );
- $oe_level = error_reporting(E_ALL); //grrrr
+ wfSuppressWarnings(); // E_STRICT system time bitching
$modsinceTime = strtotime( $modsince );
- error_reporting($oe_level); //grrrr
+ wfRestoreWarnings();
$ismodsince = wfTimestamp( TS_MW, $modsinceTime ? $modsinceTime : 1 );
wfDebug( "$fname: -- client send If-Modified-Since: " . $modsince . "\n", false );
$oldtz = getenv( 'TZ' );
putenv( 'TZ='.$wgLocaltimezone );
}
- $oe_level = error_reporting(E_ALL); #grrrr
+ wfSuppressWarnings(); // E_STRICT system time bitching
$localTimestamp = date( 'YmdHis', $ts );
$localMonth = date( 'm', $ts );
$localMonthName = date( 'n', $ts );
if ( isset( $wgLocaltimezone ) ) {
putenv( 'TZ='.$oldtz );
}
-
- error_reporting($oe_level); #grrrr
+ wfRestoreWarnings();
switch ( $index ) {
case 'currentmonth':
# No difference ? Return time unchanged
if ( 0 == $hrDiff && 0 == $minDiff ) { return $ts; }
- $eo_level = error_reporting(E_ALL); //grrr, no system date bitching
+ wfSuppressWarnings(); // E_STRICT system time bitching
# Generate an adjusted date
$t = mktime( (
(int)substr( $ts, 8, 2) ) + $hrDiff, # Hours
(int)substr( $ts, 0, 4 ) ); #Year
$date = date( 'YmdHis', $t );
- error_reporting($eo_level); //grrr
+ wfRestoreWarnings();
return $date;
}