Internal: Avoid DatePicker error if no required field at all when submitting a form

pull/4969/head
Yannick Warnier 1 year ago
parent a1c06d2c5b
commit f9850dafe9
  1. 2
      public/main/inc/lib/formvalidator/Element/DatePicker.php

@ -48,7 +48,7 @@ class DatePicker extends HTML_QuickForm_text
}
$variable = str_replace('extra_', '',$id);
$requiredSymbol = '';
if (in_array($variable, $requiredFields)) {
if (!empty($requiredFields) && in_array($variable, $requiredFields)) {
$requiredSymbol = '<span class="form_required">*</span>';
}
return '

Loading…
Cancel
Save