From 5c009ba28fa528a47300577809c334b1b4a4d274 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Tue, 3 Jan 2023 13:56:46 +0900 Subject: [PATCH] Fix type error when page_count is not defined in query (#2039 regression) --- common/framework/db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/framework/db.php b/common/framework/db.php index 80678687d..18a0f05b6 100644 --- a/common/framework/db.php +++ b/common/framework/db.php @@ -468,7 +468,7 @@ class DB $total_count = intval($count); $total_page = max(1, intval(ceil($total_count / $list_count))); $last_index = $total_count - (($page - 1) * $list_count); - $page_handler = new \PageHandler($total_count, $total_page, $page, $page_count); + $page_handler = new \PageHandler($total_count, $total_page, $page, $page_count ?: 10); // Compose the output object. $output = new Helpers\DBResultHelper;