From 857533704eede1c3343a702946942816554a7132 Mon Sep 17 00:00:00 2001 From: wolfcode <37436228+wolf-leo@users.noreply.github.com> Date: Tue, 27 Aug 2024 18:49:26 +0800 Subject: [PATCH] fix(admin-controller): ensure page and limit are integers Cast page and limit values to integers in AdminController's filter method to prevent type-related errors. This change guarantees that these parameters are whole numbers, which is essential for consistent database pagination and filtering operations. --- app/common/controller/AdminController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/common/controller/AdminController.php b/app/common/controller/AdminController.php index c3f53b3..733548c 100644 --- a/app/common/controller/AdminController.php +++ b/app/common/controller/AdminController.php @@ -199,7 +199,7 @@ class AdminController extends BaseController $where[] = [$key, $op, "%{$val}"]; } } - return [$page, $limit, $where, $excludes]; + return [(int)$page, (int)$limit, $where, $excludes]; } /**