From 711e760ecf671f3b43204c4276a96477bea6dea7 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Sun, 8 Feb 2009 20:42:38 +0000 Subject: [PATCH] Fixed divison by zero in empty pager. --- includes/db_pager.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/db_pager.inc b/includes/db_pager.inc index 10d27244..819b4757 100644 --- a/includes/db_pager.inc +++ b/includes/db_pager.inc @@ -303,7 +303,8 @@ class db_pager { return false; $row = db_fetch_row($result); $this->rec_count = $row[0]; - $this->max_page = ceil($this->rec_count/$this->page_len); + $this->max_page = $this->page_len ? + ceil($this->rec_count/$this->page_len) : 0; if ($go_debug) { // FIX - need column name parsing, but for now: // check if field names are set explicite in col def -- 2.30.2