mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
Merge pull request #84 from utopia-php/fix-document-check
Expose attributes and indexes
This commit is contained in:
3 files changed
+2041
-489
No files matched your search
+1
-1
@@ -22,7 +22,7 @@
|
||||
"ext-pdo": "*",
|
||||
"ext-curl": "*",
|
||||
"ext-redis": "*",
|
||||
"utopia-php/database": "0.53.*"
|
||||
"utopia-php/database": "0.53.200"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.4",
|
||||
|
||||
Generated
+2038
-486
File diff suppressed because it is too large.
Load diff
@@ -175,7 +175,7 @@ class TimeLimit extends TimeLimitAdapter
|
||||
Query::equal('time', [$datetime]),
|
||||
]);
|
||||
|
||||
if ($data === false) {
|
||||
if ($data->isEmpty()) {
|
||||
$data = [
|
||||
'$permissions' => [],
|
||||
'key' => $key,
|
||||
@@ -193,7 +193,7 @@ class TimeLimit extends TimeLimitAdapter
|
||||
Query::equal('time', [$datetime]),
|
||||
]);
|
||||
|
||||
if ($data !== false && $data instanceof Document) {
|
||||
if (!$data->isEmpty()) {
|
||||
$count = $data->getAttribute('count', 0);
|
||||
if (\is_numeric($count)) {
|
||||
$this->count = intval($count);
|
||||
|
||||
Reference in new issue
Block a user