Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Validate all rich objects not only the used ones
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen committed Nov 23, 2018
commit 695e60228d0a2441dcbb3b8512d9b9be4fbfd2d8
10 changes: 8 additions & 2 deletions lib/private/RichObjectStrings/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,17 @@ public function validate($subject, array $parameters) {
foreach ($matches[1] as $parameter) {
if (!isset($parameters[$parameter])) {
throw new InvalidObjectExeption('Parameter is undefined');
} else {
$this->validateParameter($parameters[$parameter]);
}
}
}

foreach ($parameters as $parameter) {
if (!\is_array($parameter)) {
throw new InvalidObjectExeption('Parameter is malformed');
}

$this->validateParameter($parameter);
}
}

/**
Expand Down