Skip to content

Commit 375fcb0

Browse files
committed
Revert "fix: remove int cast from getTenant to fix strict type comparison"
This reverts commit 7e84398.
1 parent 906c03e commit 375fcb0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Database/Document.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,13 @@ public function getUpdatedAt(): ?string
177177
*/
178178
public function getTenant(): int|string|null
179179
{
180-
return $this->getAttribute('$tenant');
180+
$tenant = $this->getAttribute('$tenant');
181+
182+
if (\is_numeric($tenant)) {
183+
return (int) $tenant;
184+
}
185+
186+
return $tenant;
181187
}
182188

183189
/**

0 commit comments

Comments
 (0)