From 2072869ffec36b0a410999299d6106705e18ae5d Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 11 Jun 2014 10:47:23 +0000 Subject: [PATCH] fixed wrong "Startdate must be before enddate" validation error, if no start- or end-date given --- infolog/inc/class.infolog_ui.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infolog/inc/class.infolog_ui.inc.php b/infolog/inc/class.infolog_ui.inc.php index 65fb40bc34..7db4816cd6 100644 --- a/infolog/inc/class.infolog_ui.inc.php +++ b/infolog/inc/class.infolog_ui.inc.php @@ -1633,10 +1633,10 @@ class infolog_ui } } //Validate the enddate must be grather than startdate - if (isset($content['info_enddate']) && isset($content['info_startdate'])) + if (!empty($content['info_enddate']) && !empty($content['info_startdate'])) { $duration_date = $content['info_enddate']-$content['info_startdate']; - if (isset($duration_date) && $duration_date < 0 ) + if ($duration_date < 0) { $this->tmpl->set_validation_error('info_startdate', lang('Startdate must be before Enddate!!!')); $button = $action = ''; // stop save or apply