From: Janusz Dobrowolski Date: Sun, 8 Feb 2009 20:42:38 +0000 (+0000) Subject: Fixed divison by zero in empty pager. X-Git-Tag: v2.4.2~19^2~1547 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=711e760ecf671f3b43204c4276a96477bea6dea7;p=fa-stable.git Fixed divison by zero in empty pager. --- 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