Form : do not use an error array if there is no error and the array is false
This commit is contained in:
@@ -613,7 +613,7 @@ class Form
|
||||
return $inputDate;
|
||||
}
|
||||
$errors = $date->getLastErrors();
|
||||
if ($errors["warning_count"] > 0 || $errors["error_count"] > 0) {
|
||||
if (is_array($errors) && ($errors["warning_count"] > 0 || $errors["error_count"] > 0)) {
|
||||
return $inputDate;
|
||||
}
|
||||
return $date->format($outputFormat);
|
||||
|
||||
Reference in New Issue
Block a user