diff --git a/framework/core/src/Core/Notification/NotificationSyncer.php b/framework/core/src/Core/Notification/NotificationSyncer.php index 8287b42ab..e1039afd7 100644 --- a/framework/core/src/Core/Notification/NotificationSyncer.php +++ b/framework/core/src/Core/Notification/NotificationSyncer.php @@ -85,6 +85,10 @@ class NotificationSyncer // it isn't marked as deleted. If they don't, we will want to create a // new record for them. foreach ($users as $user) { + if (! ($user instanceof User)) { + continue; + } + $existing = $toDelete->first(function ($i, $notification) use ($user) { return $notification->user_id === $user->id; });