From 3c9f628386fe1a5cc3b28dbe204155200d2bc3be Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq.com> Date: Thu, 7 May 2026 09:40:05 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=BC=96=E8=BE=91=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/AdminUsersService.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Services/AdminUsersService.php b/app/Services/AdminUsersService.php index 134492f..de11f9e 100644 --- a/app/Services/AdminUsersService.php +++ b/app/Services/AdminUsersService.php @@ -194,7 +194,9 @@ final class AdminUsersService $item['role_name'] = $item->roles->value('name'); $item['packing_name'] = ''; if ($is_edit) { - $item['role_id'] = $item['roles'][0]['id']; + if (isset($item['roles'][0])) { + $item['role_id'] = $item['roles'][0]['id']; + } //$item['packing_id'] = ''; } unset($item['roles']);