aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Activity/Event.php4
-rw-r--r--lib/private/RichObjectStrings/Validator.php9
2 files changed, 11 insertions, 2 deletions
diff --git a/lib/private/Activity/Event.php b/lib/private/Activity/Event.php
index 97ab7d1c935..02cfd758058 100644
--- a/lib/private/Activity/Event.php
+++ b/lib/private/Activity/Event.php
@@ -259,7 +259,7 @@ class Event implements IEvent {
}
/**
- * @return array[]
+ * @return array<string, array<string, string>>
* @since 11.0.0
*/
public function getRichSubjectParameters(): array {
@@ -335,7 +335,7 @@ class Event implements IEvent {
}
/**
- * @return array[]
+ * @return array<string, array<string, string>>
* @since 11.0.0
*/
public function getRichMessageParameters(): array {
diff --git a/lib/private/RichObjectStrings/Validator.php b/lib/private/RichObjectStrings/Validator.php
index 41c2456ba27..197f48ed48c 100644
--- a/lib/private/RichObjectStrings/Validator.php
+++ b/lib/private/RichObjectStrings/Validator.php
@@ -78,6 +78,15 @@ class Validator implements IValidator {
if (!empty($missingKeys)) {
throw new InvalidObjectExeption('Object is invalid, missing keys:'.json_encode($missingKeys));
}
+
+ foreach ($parameter as $key => $value) {
+ if (!is_string($key)) {
+ throw new InvalidObjectExeption('Object is invalid, key ' . $key . ' is not a string');
+ }
+ if (!is_string($value)) {
+ throw new InvalidObjectExeption('Object is invalid, value ' . $value . ' is not a string');
+ }
+ }
}
/**