Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove null check
  • Loading branch information
fogelito committed Jul 16, 2025
commit aeed740d7fbe27d8bf41c7c9b387f88b66795a36
2 changes: 1 addition & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
stopOnFailure="0"
>
<testsuites>
<testsuite name="unit">
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Adapter/MariaDB.php
Original file line number Diff line number Diff line change
Expand Up @@ -1644,7 +1644,7 @@ public function find(string $collection, array $queries = [], ?int $limit = 25,
unset($results[$index]['_id']);
}
if (\array_key_exists('_tenant', $document)) {
$results[$index]['$tenant'] = $document['_tenant'] === null ? null : $document['_tenant'];
$results[$index]['$tenant'] = $document['_tenant'];
unset($results[$index]['_tenant']);
}
if (\array_key_exists('_createdAt', $document)) {
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Adapter/Postgres.php
Original file line number Diff line number Diff line change
Expand Up @@ -1529,7 +1529,7 @@ public function find(string $collection, array $queries = [], ?int $limit = 25,
unset($results[$index]['_id']);
}
if (\array_key_exists('_tenant', $document)) {
$results[$index]['$tenant'] = $document['_tenant'] === null ? null : $document['_tenant'];
$results[$index]['$tenant'] = $document['_tenant'];
unset($results[$index]['_tenant']);
}
if (\array_key_exists('_createdAt', $document)) {
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Adapter/SQL.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ public function getDocument(string $collection, string $id, array $queries = [],
unset($document['_uid']);
}
if (\array_key_exists('_tenant', $document)) {
$document['$tenant'] = $document['_tenant'] === null ? null : $document['_tenant'];
$document['$tenant'] = $document['_tenant'];
unset($document['_tenant']);
}
if (\array_key_exists('_createdAt', $document)) {
Expand Down
Loading