diff --git a/src/Database/Document.php b/src/Database/Document.php index 6311841b4..a4bab306b 100644 --- a/src/Database/Document.php +++ b/src/Database/Document.php @@ -55,7 +55,7 @@ public function __construct(array $input = []) */ public function getId(): string { - return $this->getAttribute('$id', ''); + return $this->getAttribute('$id', '') ?? ''; } /** @@ -63,7 +63,7 @@ public function getId(): string */ public function getInternalId(): string { - return $this->getAttribute('$internalId', ''); + return $this->getAttribute('$internalId', '') ?? ''; } /** @@ -71,7 +71,7 @@ public function getInternalId(): string */ public function getCollection(): string { - return $this->getAttribute('$collection', ''); + return $this->getAttribute('$collection', '') ?? ''; } /**