From 329fc04f6cd6f6ae35fef1d79d5c97b858ca720f Mon Sep 17 00:00:00 2001 From: chansizzle <14916599+chansizzle@users.noreply.github.com> Date: Fri, 15 May 2020 16:24:00 -0600 Subject: [PATCH] Update paging.php (#5279) fix Notice: Undefined variable: max_page --- resources/paging.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/resources/paging.php b/resources/paging.php index 14cbdf871b..81a74ee4f2 100644 --- a/resources/paging.php +++ b/resources/paging.php @@ -77,7 +77,10 @@ function paging($num_rows, $param, $rows_per_page, $mini = false, $result_count if ($num_rows > 0) { $max_page = ceil($num_rows/$rows_per_page); } - + else { + $max_page = 1; + } + //add multi-lingual support $language = new text; $text = $language->get(); @@ -188,4 +191,4 @@ function paging($num_rows, $param, $rows_per_page, $mini = false, $result_count } -?> \ No newline at end of file +?>