X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FPager.php;h=c12608d45d84bbfb10173486c59978230f943522;hb=fd706cf9a7a0c4700838a1f00b12d8fd37323b7c;hp=4045ac8443153b78b9cbe71ab89f0e6aadb1215e;hpb=c5632a061fe3c712cb20bf4584a2292b8c2631ed;p=friendica.git diff --git a/src/Content/Pager.php b/src/Content/Pager.php index 4045ac8443..c12608d45d 100644 --- a/src/Content/Pager.php +++ b/src/Content/Pager.php @@ -39,7 +39,7 @@ class Pager { $this->setQueryString($queryString); $this->setItemsPerPage($itemsPerPage); - $this->setPage(defaults($_GET, 'page', 1)); + $this->setPage(($_GET['page'] ?? 0) ?: 1); } /** @@ -65,7 +65,7 @@ class Pager /** * Returns the current page number * - * @return type + * @return int */ public function getPage() { @@ -140,6 +140,7 @@ class Pager * * @param integer $itemCount The number of displayed items on the page * @return string HTML string of the pager + * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ public function renderMinimal($itemCount) { @@ -182,6 +183,7 @@ class Pager * * @param integer $itemCount The total number of items including those note displayed on the page * @return string HTML string of the pager + * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ public function renderFull($itemCount) {