diff --git a/app/controller/admin/Auth.php b/app/controller/admin/Auth.php index 52dd221..6a103e5 100644 --- a/app/controller/admin/Auth.php +++ b/app/controller/admin/Auth.php @@ -246,7 +246,7 @@ class Auth extends Base { public function editRule(): Response { $id = $this->request->post('id', 0); $rules = $this->request->post('rules', []); - if ($rules) { + if (is_array($rules)) { $needAdd = []; $has = (new AdminAuthRule())->where(['group_id' => $id])->select(); $has = Tools::buildArrFromObj($has);