Handle deep nested ops

This commit is contained in:
Jake Barnby 2025-11-11 21:09:12 +13:00
parent 1efe9fa693
commit 94614d32d0

View file

@ -43,6 +43,13 @@ class Action extends AppwriteAction
}
foreach ($data as $key => $value) {
if (!\is_string($key)) {
if (\is_array($value)) {
$data[$key] = $this->parseOperators($value, $collection);
}
continue;
}
if (\str_starts_with($key, '$')) {
continue;
}
@ -81,6 +88,9 @@ class Action extends AppwriteAction
throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Invalid operator for attribute "' . $key . '": ' . $e->getMessage());
}
}
elseif (\is_array($value)) {
$data[$key] = $this->parseOperators($value, $collection);
}
}
return $data;