frontend, localization, bugfix

This commit is contained in:
2023-01-15 00:32:17 +01:00
parent 0418118841
commit 1d6ff17994
18 changed files with 297 additions and 84 deletions

View File

@@ -160,6 +160,9 @@ class Parameter {
if ($value instanceof DateTime) {
$this->value = $value;
$valid = true;
} else if (is_int($value) || (is_string($value) && preg_match("/^\d+$/", $value))) {
$this->value = (new \DateTime())->setTimestamp(intval($value));
$valid = true;
} else {
$format = $this->getFormat();
$d = DateTime::createFromFormat($format, $value);

View File

@@ -13,11 +13,15 @@ class StringType extends Parameter {
}
public function parseParam($value): bool {
if(!is_string($value)) {
if (!parent::parseParam($value)) {
return false;
}
if($this->maxLength > 0 && strlen($value) > $this->maxLength) {
if (!is_string($value)) {
return false;
}
if ($this->maxLength > 0 && strlen($value) > $this->maxLength) {
return false;
}