From 5303ff0641fe40bdb31ad01322d8bec51d09c9cc Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 11 Sep 2019 04:03:55 +0200 Subject: [PATCH] Fix rendering I was getting the following error: Argument 1 passed to Nette\Utils\Paginator::setPage() must be of the type int, null given (via SmartObject) --- src/VisualPaginator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/VisualPaginator.php b/src/VisualPaginator.php index 9254d43..88e4f95 100644 --- a/src/VisualPaginator.php +++ b/src/VisualPaginator.php @@ -232,7 +232,7 @@ public function loadState(array $params): void { } } - $this->getPaginator()->page = $this->page; + $this->getPaginator()->page = ($this->page === NULL ? 1 : $this->page); $this->getPaginator()->itemsPerPage = $this->itemsPerPage; $this->page = $this->getPaginator()->page; $this->itemsPerPage = $this->getPaginator()->itemsPerPage;