[-] FO : fixed loop redirect when pagination have 0 product

This commit is contained in:
vAugagneur committed 2012-12-17 15:25:56 +01:00
1 parent 3d35871fd5
commit e472ff7239
1 file changed
+1 -1
+1 -1
View File
@@ -867,7 +867,7 @@ class FrontControllerCore extends Controller
$this->context->cookie->nb_item_per_page = $this->n; $this->context->cookie->nb_item_per_page = $this->n;
$pages_nb = ceil($nbProducts / (int)$this->n); $pages_nb = ceil($nbProducts / (int)$this->n);
if ($this->p > $pages_nb) if ($this->p > $pages_nb && $nbProducts <> 0)
Tools::redirect(self::$link->getPaginationLink(false, false, $this->n, false, $pages_nb, false)); Tools::redirect(self::$link->getPaginationLink(false, false, $this->n, false, $pages_nb, false));
$start = (int)($this->p - $range); $start = (int)($this->p - $range);