Skip to content

Commit

Permalink
ensure users is not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdulici committed Jun 1, 2023
1 parent 1a2c711 commit 7241be1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/Listeners/Email/SendInvalidEmailNotification.php
Expand Up @@ -10,7 +10,11 @@ class SendInvalidEmailNotification
{
public function handle(Event $event): void
{
$users = company()->users;
$users = company()?->users;

if (empty($users)) {
return;
}

$this->notifyAdminsAboutInvalidContactEmail($event, $users);

Expand Down

0 comments on commit 7241be1

Please sign in to comment.