root 5 anos atrás
pai
commit
77a98adbc8
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      app/Http/Controllers/TicketController.php

+ 1 - 1
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 {