Skip to content

Commit a6a6c32

Browse files
author
Bartek
authored
EZP-32018: Added additional validation to ezdate fieldtype (#1465)
1 parent 9f16e49 commit a6a6c32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ezutils/classes/eztimestamp.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class eZTimestamp
1515
*/
1616
public static function getUtcTimestampFromLocalTimestamp( $localTimestamp ) {
1717

18-
if ( !$localTimestamp )
18+
if ( $localTimestamp === null || $localTimestamp === '' )
1919
{
2020
return null;
2121
}
@@ -35,7 +35,7 @@ public static function getUtcTimestampFromLocalTimestamp( $localTimestamp ) {
3535
*/
3636
public static function getLocalTimestampFromUtcTimestamp( $utcTimestamp ) {
3737

38-
if ( !$utcTimestamp )
38+
if ( $utcTimestamp === null || $utcTimestamp === '' )
3939
{
4040
return null;
4141
}

0 commit comments

Comments
 (0)