Followup r71751: change strict comparison to loose per CR, and add a comment explaini...
authorRoan Kattouw <catrope@users.mediawiki.org>
Wed, 29 Dec 2010 22:28:26 +0000 (22:28 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Wed, 29 Dec 2010 22:28:26 +0000 (22:28 +0000)
includes/GlobalFunctions.php

index 79438d9..e94ac72 100644 (file)
@@ -1948,7 +1948,7 @@ function wfTimestamp( $outputtype = TS_UNIX, $ts = 0 ) {
        $da = array();
        $strtime = '';
 
-       if ( $ts === 0 ) {
+       if ( $ts == 0 ) { // This intentionally catches $ts === '' 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 ) ) {