diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 9075e170137..f31e8f9b048 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -868,7 +868,15 @@ class Categorie extends CommonObject } } - if ($limit) $sql.= $this->db->plimit($limit + 1, $offset); + if ($limit) { + if ($page < 0) + { + $page = 0; + } + $offset = $limit * $page; + + $sql.= $this->db->plimit($limit + 1, $offset); + } $result = $this->db->query($sql); if ($result)