BranchModificationStore: cast eventual objects

This commit is contained in:
Thomas Gelf 2021-08-24 18:47:13 +02:00
parent 23f1fae784
commit 44b749f2bf

View File

@ -228,7 +228,7 @@ class BranchModificationStore
'uuid' => Uuid::uuid4()->getBytes(), 'uuid' => Uuid::uuid4()->getBytes(),
'object_id' => $objectId, 'object_id' => $objectId,
'created' => 'y', 'created' => 'y',
] + $properties); ] + (array) $properties);
} }
protected function delete($objectId, UuidInterface $branchUuid) protected function delete($objectId, UuidInterface $branchUuid)
@ -247,13 +247,13 @@ class BranchModificationStore
'branch_uuid' => $branchUuid->getBytes(), 'branch_uuid' => $branchUuid->getBytes(),
'uuid' => Uuid::uuid4()->getBytes(), 'uuid' => Uuid::uuid4()->getBytes(),
'object_id' => $objectId, 'object_id' => $objectId,
] + $properties); ] + (array) $properties);
} }
protected function update($binaryUuid, $properties) protected function update($binaryUuid, $properties)
{ {
$this->db->update($this->table, [ $this->db->update($this->table, [
'uuid' => Uuid::uuid4()->getBytes(), 'uuid' => Uuid::uuid4()->getBytes(),
] + $properties, $this->db->quoteInto('uuid = ?', $binaryUuid)); ] + (array) $properties, $this->db->quoteInto('uuid = ?', $binaryUuid));
} }
} }