Skip to content

Commit 64018f5

Browse files
[Fix] Return empty array when $record's to, cc or bcc is empty (#18) (#19)
1 parent e730094 commit 64018f5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Resources/MailResource.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,9 +386,9 @@ public static function table(Table $table): Table
386386
->form(self::getResendForm())
387387
->fillForm(function (Mail $record) {
388388
return [
389-
'to' => array_keys($record->to),
390-
'cc' => array_keys($record->cc),
391-
'bcc' => array_keys($record->bcc),
389+
'to' => array_keys($record->to ?: []),
390+
'cc' => array_keys($record->cc ?: []),
391+
'bcc' => array_keys($record->bcc ?: []),
392392
];
393393
})
394394
->action(function (Mail $record, array $data) {

0 commit comments

Comments
 (0)