acl view done

This commit is contained in:
2024-03-27 16:27:26 +01:00
parent aa51380055
commit a8f4c84f60
5 changed files with 119 additions and 17 deletions

View File

@@ -93,7 +93,7 @@ abstract class Request {
foreach ($structure as $name => $param) {
$value = $values[$name] ?? NULL;
$isEmpty = (is_string($value) && strlen($value) === 0) || (is_array($value) && empty($value));
$isEmpty = is_string($value) && strlen($value) === 0;
if (!$param->optional && (is_null($value) || $isEmpty)) {
return $this->createError("Missing parameter: $name");
}