diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-08-16 14:14:17 +0300 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-08-16 14:14:17 +0300 |
commit | 151209f2b8b87360f728f8eff39e025aa5a46eae (patch) | |
tree | aefa74dd890a11d06cb9780b332696f691b1b35f /lib | |
parent | 871e50e46dbae402b881c354ec06459c787f8331 (diff) |
Handle empty list of notifications to delete
Save two query
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Handler.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Handler.php b/lib/Handler.php index 4d16908..4601d0f 100644 --- a/lib/Handler.php +++ b/lib/Handler.php @@ -108,6 +108,10 @@ class Handler { } $statement->closeCursor(); + if (count($notifications) === 0) { + return []; + } + $this->connection->beginTransaction(); try { $shouldFlush = $this->manager->defer(); |