Skip to content

Commit 7baabc9

Browse files
authored
do not assume toString() method (#57340)
1 parent 95fc3d0 commit 7baabc9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Illuminate/Notifications/NotificationSender.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function sendNow($notifiables, $notification, ?array $channels = null)
111111
}
112112

113113
$this->withLocale($this->preferredLocale($notifiable, $notification), function () use ($viaChannels, $notifiable, $original) {
114-
$notificationId = Str::uuid()->toString();
114+
$notificationId = (string) Str::uuid();
115115

116116
foreach ((array) $viaChannels as $channel) {
117117
if (! ($notifiable instanceof AnonymousNotifiable && $channel === 'database')) {
@@ -216,7 +216,7 @@ protected function queueNotification($notifiables, $notification)
216216
$original = clone $notification;
217217

218218
foreach ($notifiables as $notifiable) {
219-
$notificationId = Str::uuid()->toString();
219+
$notificationId = (string) Str::uuid();
220220

221221
foreach ((array) $original->via($notifiable) as $channel) {
222222
$notification = clone $original;

src/Illuminate/Support/Testing/Fakes/NotificationFake.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ public function sendNow($notifiables, $notification, ?array $channels = null)
314314

315315
foreach ($notifiables as $notifiable) {
316316
if (! $notification->id) {
317-
$notification->id = Str::uuid()->toString();
317+
$notification->id = (string) Str::uuid();
318318
}
319319

320320
$notifiableChannels = $channels ?: $notification->via($notifiable);

0 commit comments

Comments
 (0)