mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
fix: reject unsupported relationship value types
This commit is contained in:
+2
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user