projects
/
fa-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5242af
)
Fixed divison by zero in empty pager.
author
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Sun, 8 Feb 2009 20:42:38 +0000
(20:42 +0000)
committer
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Sun, 8 Feb 2009 20:42:38 +0000
(20:42 +0000)
includes/db_pager.inc
patch
|
blob
|
history
diff --git
a/includes/db_pager.inc
b/includes/db_pager.inc
index 10d27244aefd96a352443a8249daddd0e3a86e4c..819b4757f5c7e3381b749f9bc3d7073b8ea187ec 100644
(file)
--- 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