mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
lib: Fix Number::isValid(), again :)
This commit is contained in:
parent
ccfbc13a38
commit
79c9a8af9b
@ -134,7 +134,7 @@ class Number extends FormElement
|
||||
{
|
||||
$this->setValue($value);
|
||||
$value = $this->getValue();
|
||||
if ($this->isRequired() && ! is_numeric($value)) {
|
||||
if ($value !== '' && ! is_numeric($value)) {
|
||||
$this->addError(sprintf(t('\'%s\' is not a valid number'), $value));
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user