Skip to content

Commit 895ce2c

Browse files
committed
Check empty internal id
1 parent 4749bab commit 895ce2c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Database/Adapter/MariaDB.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -948,8 +948,7 @@ public function createDocument(string $collection, Document $document): Document
948948

949949
$stmt->execute();
950950

951-
$result = $this->getDocument($collection, $document->getId(), [Query::select(['$internalId'])]);
952-
$document['$internalId'] = $result->getInternalId();
951+
$document['$internalId'] = $this->getDocument($collection, $document->getId(), [Query::select(['$internalId'])])->getInternalId();
953952

954953
if (empty($document['$internalId'])) {
955954
throw new DatabaseException('Error creating document empty "$internalId"');

0 commit comments

Comments
 (0)