Skip to content

Commit

Permalink
Fixed issue #7843: Date/time field (HH:MM) does not display value, wh…
Browse files Browse the repository at this point in the history
…en visited again
  • Loading branch information
c-schmitz committed Jun 9, 2013
1 parent f333045 commit f36e3cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/helpers/qanda_helper.php
Expand Up @@ -1158,7 +1158,7 @@ function do_date($ia)
case 'G':
$answer .= '<label for="hour'.$ia[1].'" class="hide">'.$clang->gT('Hour').'</label><select id="hour'.$ia[1].'" name="hour'.$ia[1].'" class="hour"><option value="">'.$clang->gT('Hour').'</option>';
for ($i=0; $i<24; $i++) {
if ($i === $currenthour)
if ($i === (int)$currenthour && is_numeric($currenthour))
{
$i_date_selected = SELECTED;
}
Expand All @@ -1183,7 +1183,7 @@ function do_date($ia)
<option value="">'.$clang->gT('Minute').'</option>';

for ($i=0; $i<60; $i+=$aQuestionAttributes['dropdown_dates_minute_step']) {
if ($i === $currentminute)
if ($i === (int)$currentminute && is_numeric($currentminute))
{
$i_date_selected = SELECTED;
}
Expand Down

0 comments on commit f36e3cc

Please sign in to comment.