mirror of https://github.com/MISP/MISP
fix: Cleaner fix, testBool doesn't need to run testForEmpty
parent
7d3a04cb2e
commit
569b342ef5
|
@ -2104,7 +2104,6 @@ class Server extends AppModel {
|
|||
}
|
||||
|
||||
public function testForEmpty($value) {
|
||||
if ($value === false) return true;
|
||||
$value = trim($value);
|
||||
if ($value === '') return 'Value not set.';
|
||||
return true;
|
||||
|
@ -2161,7 +2160,6 @@ class Server extends AppModel {
|
|||
}
|
||||
|
||||
public function testBool($value) {
|
||||
if ($this->testForEmpty($value) !== true) return $this->testForEmpty($value);
|
||||
if ($value !== true && $value !== false) return 'Value is not a boolean, make sure that you convert \'true\' to true for example.';
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue