Skip to content

Commit

Permalink
[BUGFIX] Fix warning for undefined array key page (#1226)
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Meyer <[email protected]>
  • Loading branch information
beatrycze-volk and sebastian-meyer committed May 30, 2024
1 parent ac9750f commit 1733dd1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions Classes/Controller/ListViewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,7 @@ public function mainAction(): void
}

// Get current page from request data because the parameter is shared between plugins
$currentPage = $this->requestData['page'];
if (empty($currentPage)) {
$currentPage = 1;
}
$currentPage = $this->requestData['page'] ?? 1;

// get all sortable metadata records
$sortableMetadata = $this->metadataRepository->findByIsSortable(true);
Expand Down
5 changes: 1 addition & 4 deletions Classes/Controller/PageGridController.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ public function mainAction(): void
}

// Get current page from request data because the parameter is shared between plugins
$currentPage = $this->requestData['page'];
if (empty($currentPage)) {
$currentPage = 1;
}
$currentPage = $this->requestData['page'] ?? 1;

$itemsPerPage = $this->settings['paginate']['itemsPerPage'];
if (empty($itemsPerPage)) {
Expand Down

0 comments on commit 1733dd1

Please sign in to comment.