summaryrefslogtreecommitdiffstats
path: root/lib/private/RichObjectStrings
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/RichObjectStrings')
-rw-r--r--lib/private/RichObjectStrings/Validator.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/private/RichObjectStrings/Validator.php b/lib/private/RichObjectStrings/Validator.php
index 55a50fc2a48..29980885cf8 100644
--- a/lib/private/RichObjectStrings/Validator.php
+++ b/lib/private/RichObjectStrings/Validator.php
@@ -71,11 +71,17 @@ class Validator implements IValidator {
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);
+ }
}
/**