Skip to content

Commit 711235f

Browse files
authored
Merge pull request grokability#16519 from marcusmoore/bug/sc-28696
Fixed issue with bad email addresses in expiration alerts and upcoming audits
2 parents c711278 + b26a73e commit 711235f

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

app/Console/Commands/SendExpirationAlerts.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public function handle()
4949
// Send a rollup to the admin, if settings dictate
5050
$recipients = collect(explode(',', $settings->alert_email))
5151
->map(fn($item) => trim($item)) // Trim each email
52+
->filter(fn($item) => !empty($item))
5253
->all();
5354
// Expiring Assets
5455
$assets = Asset::getExpiringWarrantee($alert_interval);

app/Console/Commands/SendUpcomingAuditReport.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public function handle()
5555
// Send a rollup to the admin, if settings dictate
5656
$recipients = collect(explode(',', $settings->alert_email))
5757
->map(fn($item) => trim($item))
58+
->filter(fn($item) => !empty($item))
5859
->all();
5960

6061

0 commit comments

Comments
 (0)