diff --git a/includes/classes/Event.php b/includes/classes/Event.php index 994ed8140..e24ebe64d 100644 --- a/includes/classes/Event.php +++ b/includes/classes/Event.php @@ -202,7 +202,7 @@ function __construct ( $name, $description, $date, $time, $id, $extForID, $this->_calType = $calType; $this->_location = $location; $this->_url = $url; - $this->_dueDate = $dueDate; + $this->_dueDate = empty($dueDate) ? '' : $dueDate; $this->_dueTime = sprintf ( "%06d", $dueTime ); $this->_due = $dueDate . sprintf ( "%06d", $dueTime ); $this->_percent = $percent; diff --git a/includes/functions.php b/includes/functions.php index 4141d9631..8dd9c6000 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -821,14 +821,14 @@ function date_to_epoch( $d, $gmt = true ) { if ( $gmt ) return gmmktime ( $dH, $di, $ds, - substr ( $d, 4, 2 ), - substr ( $d, 6, 2 ), - substr ( $d, 0, 4 ) ); + (int)substr ( $d, 4, 2 ), + (int)substr ( $d, 6, 2 ), + (int)substr ( $d, 0, 4 ) ); else return mktime ( $dH, $di, $ds, - substr ( $d, 4, 2 ), - substr ( $d, 6, 2 ), - substr ( $d, 0, 4 ) ); + (int)substr ( $d, 4, 2 ), + (int)substr ( $d, 6, 2 ), + (int)substr ( $d, 0, 4 ) ); }