Index: trunk/phase3/includes/Parser.php |
— | — | @@ -2416,8 +2416,8 @@ |
2417 | 2417 | $oldtz = getenv( 'TZ' ); |
2418 | 2418 | putenv( 'TZ='.$wgLocaltimezone ); |
2419 | 2419 | } |
2420 | | - $oe_level = error_reporting(E_ALL); #grrrr |
2421 | 2420 | |
| 2421 | + wfSuppressWarnings(); // E_STRICT system time bitching |
2422 | 2422 | $localTimestamp = date( 'YmdHis', $ts ); |
2423 | 2423 | $localMonth = date( 'm', $ts ); |
2424 | 2424 | $localMonthName = date( 'n', $ts ); |
— | — | @@ -2430,8 +2430,7 @@ |
2431 | 2431 | if ( isset( $wgLocaltimezone ) ) { |
2432 | 2432 | putenv( 'TZ='.$oldtz ); |
2433 | 2433 | } |
2434 | | - |
2435 | | - error_reporting($oe_level); #grrrr |
| 2434 | + wfRestoreWarnings(); |
2436 | 2435 | |
2437 | 2436 | switch ( $index ) { |
2438 | 2437 | case 'currentmonth': |
Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -158,9 +158,9 @@ |
159 | 159 | # this breaks strtotime(). |
160 | 160 | $modsince = preg_replace( '/;.*$/', '', $_SERVER["HTTP_IF_MODIFIED_SINCE"] ); |
161 | 161 | |
162 | | - $oe_level = error_reporting(E_ALL); //grrrr |
| 162 | + wfSuppressWarnings(); // E_STRICT system time bitching |
163 | 163 | $modsinceTime = strtotime( $modsince ); |
164 | | - error_reporting($oe_level); //grrrr |
| 164 | + wfRestoreWarnings(); |
165 | 165 | |
166 | 166 | $ismodsince = wfTimestamp( TS_MW, $modsinceTime ? $modsinceTime : 1 ); |
167 | 167 | wfDebug( "$fname: -- client send If-Modified-Since: " . $modsince . "\n", false ); |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -438,7 +438,7 @@ |
439 | 439 | # No difference ? Return time unchanged |
440 | 440 | if ( 0 == $hrDiff && 0 == $minDiff ) { return $ts; } |
441 | 441 | |
442 | | - $eo_level = error_reporting(E_ALL); //grrr, no system date bitching |
| 442 | + wfSuppressWarnings(); // E_STRICT system time bitching |
443 | 443 | # Generate an adjusted date |
444 | 444 | $t = mktime( ( |
445 | 445 | (int)substr( $ts, 8, 2) ) + $hrDiff, # Hours |
— | — | @@ -449,7 +449,7 @@ |
450 | 450 | (int)substr( $ts, 0, 4 ) ); #Year |
451 | 451 | |
452 | 452 | $date = date( 'YmdHis', $t ); |
453 | | - error_reporting($eo_level); //grrr |
| 453 | + wfRestoreWarnings(); |
454 | 454 | |
455 | 455 | return $date; |
456 | 456 | } |