Skip to content

Commit

Permalink
fix for year=0 in dropdown-boxes
Browse files Browse the repository at this point in the history
When dropdown boxes are used and a min/max value refers to an empty
variable
or zero value, default range is now used
  • Loading branch information
mfaber authored and unknown committed Jul 22, 2013
1 parent e3ab1d3 commit dfb13b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions application/helpers/qanda_helper.php
Expand Up @@ -1102,16 +1102,16 @@ function do_date($ia)
{
$yearmin = (int)substr(LimeExpressionManager::ProcessString($aQuestionAttributes['date_min']),0,4);
}
else
{
if (!isset($yearmin) || $yearmin==0)
{
$yearmin = 1900;
}

if (trim($aQuestionAttributes['date_max'])!='')
{
$yearmax = (int)substr(LimeExpressionManager::ProcessString($aQuestionAttributes['date_max']), 0, 4);
}
else
if (!isset($yearmax) || $yearmax==0)
{
$yearmax = 2037;
}
Expand Down

0 comments on commit dfb13b7

Please sign in to comment.