Skip to content

Commit

Permalink
EZP-32018: Added additional validation to ezdate fieldtype (#1465)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bartek authored Oct 14, 2020
1 parent 9f16e49 commit a6a6c32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ezutils/classes/eztimestamp.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class eZTimestamp
*/
public static function getUtcTimestampFromLocalTimestamp( $localTimestamp ) {

if ( !$localTimestamp )
if ( $localTimestamp === null || $localTimestamp === '' )
{
return null;
}
Expand All @@ -35,7 +35,7 @@ public static function getUtcTimestampFromLocalTimestamp( $localTimestamp ) {
*/
public static function getLocalTimestampFromUtcTimestamp( $utcTimestamp ) {

if ( !$utcTimestamp )
if ( $utcTimestamp === null || $utcTimestamp === '' )
{
return null;
}
Expand Down

0 comments on commit a6a6c32

Please sign in to comment.