mirror of
https://github.com/Icinga/icingaweb2.git
synced 2026-05-28 04:02:39 -04:00
Merge pull request #2923 from Icinga/bugfix/is-not-a-valid-number
Form/Element/Number: The field should be valid when empty
This commit is contained in:
commit
ade0744701
1 changed files with 1 additions and 1 deletions
|
|
@ -134,7 +134,7 @@ class Number extends FormElement
|
|||
{
|
||||
$this->setValue($value);
|
||||
$value = $this->getValue();
|
||||
if ($value !== '' && ! is_numeric($value)) {
|
||||
if ($value !== null && $value !== '' && ! is_numeric($value)) {
|
||||
$this->addError(sprintf(t('\'%s\' is not a valid number'), $value));
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue