From: Roan Kattouw Date: Wed, 29 Dec 2010 22:30:07 +0000 (+0000) Subject: Fix r79213: and $ts === null too, per CR X-Git-Tag: 1.31.0-rc.0~32995 X-Git-Url: http://git.cyclocoop.org/%22.%20generer_url_ecrire%28%22sites_tous%22%2C%22%22%29.%20%22?a=commitdiff_plain;h=341c94a05d49a375d34eb97d0ec1adbed9648b9a;p=lhc%2Fweb%2Fwiklou.git Fix r79213: and $ts === null too, per CR --- 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 ) ) {