diff --git a/app/controller/admin/Auth.php b/app/controller/admin/Auth.php index 52dd221a36acca24b94bbe7528d7b1bfdd4920a9..6a103e5948cf4ae902e8a0c7a747cde5a1a6a601 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);