Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Handle empty list of notifications to delete
Save two query

Signed-off-by: Carl Schwan <[email protected]>
  • Loading branch information
CarlSchwan committed Aug 16, 2022
commit 151209f2b8b87360f728f8eff39e025aa5a46eae
4 changes: 4 additions & 0 deletions lib/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ public function delete(INotification $notification): array {
}
$statement->closeCursor();

if (count($notifications) === 0) {
return [];
}

$this->connection->beginTransaction();
try {
$shouldFlush = $this->manager->defer();
Expand Down