Skip to content

Commit 327a213

Browse files
fix: early return when no events to append
1 parent 457444f commit 327a213

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/PdoEventStore/PdoEventStoreAdapter.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ public function fetch(?QueryInterface $query, int $fromSequence = 0): StoredReco
7474

7575
public function append(RecordedEventStream $stream, ?QueryInterface $concurrencyCheck, ?int $expectedSequence): void
7676
{
77+
if (!count($stream)) {
78+
return;
79+
}
80+
7781
[$sql, $values] = $this->driver->buildInsertStatementAndValues(
7882
$stream,
7983
$concurrencyCheck,

0 commit comments

Comments
 (0)