From 341c94a05d49a375d34eb97d0ec1adbed9648b9a Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Wed, 29 Dec 2010 22:30:07 +0000 Subject: [PATCH] Fix r79213: and $ts === null too, per CR --- includes/GlobalFunctions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index e94ac72e2f..ff30aa44da 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 ) { // 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 ) ) { -- 2.20.1