From 77a98adbc8c49e79c1b29247394255ac656b52dd Mon Sep 17 00:00:00 2001 From: root Date: Thu, 12 Dec 2019 20:27:24 +0800 Subject: [PATCH] update --- app/Http/Controllers/TicketController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/TicketController.php b/app/Http/Controllers/TicketController.php index c943e446..5be228d0 100644 --- a/app/Http/Controllers/TicketController.php +++ b/app/Http/Controllers/TicketController.php @@ -21,7 +21,7 @@ class TicketController extends Controller abort(500, '工单不存在'); } $ticket['message'] = TicketMessage::where('ticket_id', $ticket->id)->get(); - for ($i = 0; $i <= count($ticket['message']); $i++) { + for ($i = 0; $i < count($ticket['message']); $i++) { if ($ticket['message'][$i]['user_id'] == $request->session()->get('id')) { $ticket['message'][$i]['is_me'] = true; } else {