mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 00:49:02 +00:00
fix: reject unsupported relationship value types
This commit is contained in:
parent
d792d3bbea
commit
d182c85330
1 changed files with 2 additions and 0 deletions
|
|
@ -264,6 +264,8 @@ abstract class Action extends DatabasesAction
|
|||
$relationId = $relation;
|
||||
} elseif (\is_array($relation) && \array_values($relation) !== $relation) {
|
||||
$relationId = $relation['$id'] ?? null;
|
||||
} else {
|
||||
throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Relationship value must be an object, document ID string, or associative array');
|
||||
}
|
||||
|
||||
if ($relationId !== null) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue