Fix r79213: and $ts === null too, per CR
authorRoan Kattouw <catrope@users.mediawiki.org>
Wed, 29 Dec 2010 22:30:07 +0000 (22:30 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Wed, 29 Dec 2010 22:30:07 +0000 (22:30 +0000)
includes/GlobalFunctions.php

index e94ac72..ff30aa4 100644 (file)
@@ -1948,7 +1948,7 @@ function wfTimestamp( $outputtype = TS_UNIX, $ts = 0 ) {
        $da = array();
        $strtime = '';
 
-       if ( $ts == 0 ) { // This intentionally catches $ts === '' too, so DON'T change this to ===
+       if ( $ts == 0 ) { // This intentionally catches $ts === '' and $ts === null too, so DON'T change this to ===
                $uts = time();
                $strtime = "@$uts";
        } elseif ( preg_match( '/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)$/D', $ts, $da ) ) {