mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
Handle deep nested ops
This commit is contained in:
parent
1efe9fa693
commit
94614d32d0
1 changed files with 10 additions and 0 deletions
|
|
@ -43,6 +43,13 @@ class Action extends AppwriteAction
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($data as $key => $value) {
|
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, '$')) {
|
if (\str_starts_with($key, '$')) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -81,6 +88,9 @@ class Action extends AppwriteAction
|
||||||
throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Invalid operator for attribute "' . $key . '": ' . $e->getMessage());
|
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;
|
return $data;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue