acl view done
This commit is contained in:
@@ -24,7 +24,7 @@ class ArrayType extends Parameter {
|
||||
}
|
||||
|
||||
public function parseParam($value): bool {
|
||||
if(!is_array($value)) {
|
||||
if (!is_array($value)) {
|
||||
if (!$this->canBeOne) {
|
||||
return false;
|
||||
} else {
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user