Skip to content

Commit 086ddf2

Browse files
committed
fix: Configuration fallback handling
1 parent 04bedef commit 086ddf2

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/App/Mail/ExceptionOccurred.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ public function __construct($content)
2525
*/
2626
public function build(): Mailable
2727
{
28-
$emailsTo = str_getcsv(config('exceptions.emailExceptionsTo'));
29-
$ccEmails = str_getcsv(config('exceptions.emailExceptionCCto'));
30-
$bccEmails = str_getcsv(config('exceptions.emailExceptionBCCto'));
31-
$fromSender = config('exceptions.emailExceptionFrom');
32-
$subject = config('exceptions.emailExceptionSubject');
28+
$emailsTo = str_getcsv(config('exceptions.emailExceptionsTo', ''));
29+
$ccEmails = str_getcsv(config('exceptions.emailExceptionCCto', ''));
30+
$bccEmails = str_getcsv(config('exceptions.emailExceptionBCCto', ''));
31+
$fromSender = config('exceptions.emailExceptionFrom', '');
32+
$subject = config('exceptions.emailExceptionSubject', '');
3333

3434
return $this->from($fromSender)
3535
->to($emailsTo)

src/config/exceptions.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
| This is the email your exception will be from.
2121
|
2222
*/
23-
'emailExceptionFrom' => env('EMAIL_EXCEPTION_FROM', ''),
23+
'emailExceptionFrom' => env('EMAIL_EXCEPTION_FROM'),
2424

2525
/*
2626
|--------------------------------------------------------------------------
@@ -30,7 +30,7 @@
3030
| This is the email(s) the exceptions will be emailed to.
3131
|
3232
*/
33-
'emailExceptionsTo' => env('EMAIL_EXCEPTION_TO', ''),
33+
'emailExceptionsTo' => env('EMAIL_EXCEPTION_TO'),
3434

3535
/*
3636
|--------------------------------------------------------------------------
@@ -40,7 +40,7 @@
4040
| This is the email(s) the exceptions will be CC emailed to.
4141
|
4242
*/
43-
'emailExceptionCCto' => env('EMAIL_EXCEPTION_CC', ''),
43+
'emailExceptionCCto' => env('EMAIL_EXCEPTION_CC'),
4444

4545
/*
4646
|--------------------------------------------------------------------------
@@ -50,7 +50,7 @@
5050
| This is the email(s) the exceptions will be BCC emailed to.
5151
|
5252
*/
53-
'emailExceptionBCCto' => env('EMAIL_EXCEPTION_BCC', ''),
53+
'emailExceptionBCCto' => env('EMAIL_EXCEPTION_BCC'),
5454

5555
/*
5656
|--------------------------------------------------------------------------

0 commit comments

Comments
 (0)