Settings bugfix, frontend implementation, API CLI template integration

This commit is contained in:
2024-04-05 13:01:15 +02:00
parent 10f7025569
commit 98fcd2822c
12 changed files with 1098 additions and 27 deletions

View File

@@ -17,8 +17,13 @@ class StringType extends Parameter {
return false;
}
// as long as it's numeric or bool, we can safely cast it to a string
if (!is_string($value)) {
return false;
if (is_bool($value) || is_int($value) || is_float($value)) {
$this->value = strval($value);
} else {
return false;
}
}
if ($this->maxLength > 0 && strlen($value) > $this->maxLength) {