From 093c65ec82c52418fa2dcd44e136b0083704cd8c Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Wed, 29 Dec 2010 22:28:26 +0000 Subject: [PATCH] Followup r71751: change strict comparison to loose per CR, and add a comment explaining why --- includes/GlobalFunctions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 79438d98a6..e94ac72e2f 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -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 ) ) { -- 2.20.1