Skip to content

Commit 7565893

Browse files
committed
Fix wrong calculation of the remaining notifications in the daily notification email
1 parent ae53eea commit 7565893

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

wcfsetup/install/files/lib/system/cronjob/DailyMailNotificationCronjob.class.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,9 @@ public function execute(Cronjob $cronjob)
259259
$maximumNotificationCount++;
260260
}
261261
$remainingNotificationCount = $notificationCount - $maximumNotificationCount;
262+
if ($remainingNotificationCount < 0) {
263+
$remainingNotificationCount = 0;
264+
}
262265
$notifications = \array_slice($notifications, 0, $maximumNotificationCount);
263266

264267
$html = new RecipientAwareTextMimePart(

0 commit comments

Comments
 (0)