From dfb13b75604be56bba71c171bf49c61c5f2773c1 Mon Sep 17 00:00:00 2001 From: mfaber Date: Thu, 18 Jul 2013 12:53:20 +0200 Subject: [PATCH] fix for year=0 in dropdown-boxes When dropdown boxes are used and a min/max value refers to an empty variable or zero value, default range is now used --- application/helpers/qanda_helper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/helpers/qanda_helper.php b/application/helpers/qanda_helper.php index 5b30b675dd9..b1ba0a5fbb2 100644 --- a/application/helpers/qanda_helper.php +++ b/application/helpers/qanda_helper.php @@ -1102,8 +1102,8 @@ function do_date($ia) { $yearmin = (int)substr(LimeExpressionManager::ProcessString($aQuestionAttributes['date_min']),0,4); } - else - { + if (!isset($yearmin) || $yearmin==0) + { $yearmin = 1900; } @@ -1111,7 +1111,7 @@ function do_date($ia) { $yearmax = (int)substr(LimeExpressionManager::ProcessString($aQuestionAttributes['date_max']), 0, 4); } - else + if (!isset($yearmax) || $yearmax==0) { $yearmax = 2037; }