From 75153781db7aa7be0250f26cfc4ef8bad80e2c58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=94=E5=A7=AC=E6=A1=91?= Date: Mon, 7 Jun 2021 10:46:54 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20=E5=B7=A5=E5=8D=95=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E6=9C=AA=E5=BC=80=E5=90=AF=E6=97=B6=EF=BC=8C=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Admin/TicketController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Admin/TicketController.php b/app/Http/Controllers/Admin/TicketController.php index d762b4ca..e6d8e797 100644 --- a/app/Http/Controllers/Admin/TicketController.php +++ b/app/Http/Controllers/Admin/TicketController.php @@ -42,7 +42,7 @@ class TicketController extends Controller } if ($ticket = Ticket::create(['user_id' => $user->id, 'admin_id' => auth()->id(), 'title' => $data['title'], 'content' => clean($data['content'])])) { - if (in_array('mail', sysConfig('ticket_created_notification'), true)) { + if (in_array('mail', sysConfig('ticket_created_notification') ?? [], true)) { $user->notify(new TicketCreated($data['title'], $data['content'], route('replyTicket', $ticket), true)); } @@ -71,7 +71,7 @@ class TicketController extends Controller $ticket->update(['status' => 1]); // 通知用户 - if (in_array('mail', sysConfig('ticket_replied_notification'), true)) { + if (in_array('mail', sysConfig('ticket_replied_notification') ?? [], true)) { $ticket->user->notify(new TicketReplied($ticket->title, $content, route('replyTicket', $ticket), true)); } @@ -88,7 +88,7 @@ class TicketController extends Controller return Response::json(['status' => 'fail', 'message' => '关闭失败']); } // 通知用户 - if (in_array('mail', sysConfig('ticket_closed_notification'), true)) { + if (in_array('mail', sysConfig('ticket_closed_notification') ?? [], true)) { $ticket->user->notify(new TicketClosed($ticket->id, $ticket->title, route('replyTicket', $ticket), \request('reason'), true)); }