mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
fix: event validator
This commit is contained in:
1 parent
2cc2a40377
commit
95317d87b8
2 files changed
+10
-5
No files matched your search
@@ -87,11 +87,14 @@ class Event extends Validator
|
||||
}
|
||||
|
||||
if ($attribute ?? false) {
|
||||
if (
|
||||
!\array_key_exists($attribute, $events[$type][$action]) ||
|
||||
(($subType ?? false) && !\array_key_exists($attribute, $events[$type][$subType][$action]))
|
||||
) {
|
||||
return false;
|
||||
if (($subType ?? false)) {
|
||||
if (!\array_key_exists($attribute, $events[$type][$subType][$action])) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!\array_key_exists($attribute, $events[$type][$action])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user