Skip to content
Snippets Groups Projects
Commit 2afd6eb7 authored by Stefan Galinski's avatar Stefan Galinski :video_game:
Browse files

[BUGFIX] Fix possible PHP 8 warning with missing array key

parent 3eb28b53
No related branches found
No related tags found
No related merge requests found
......@@ -73,7 +73,7 @@ use TYPO3\CMS\Frontend\Page\PageAccessFailureReasons;
* The joblist plugin controller
*/
class JoblistController extends ActionController {
// the array key for the error message in the post array
// the array key for the error message in the post-array
public const ERROR_KEY_IN_POST = 'error';
private const UPLOADED_FILES = [
......@@ -170,8 +170,12 @@ class JoblistController extends ActionController {
* Initialize the indexAction to set the currentPageBrowserPage parameter
*/
public function initializeIndexAction(): void {
$currentPageBrowserPage = GeneralUtility::_GP('tx_sgjobs_pagebrowser') ?
(int) GeneralUtility::_GP('tx_sgjobs_pagebrowser')['currentPage'] : 0;
$currentPageBrowserPage = 0;
$parameters = GeneralUtility::_GP('tx_sgjobs_pagebrowser');
if (is_array($parameters)) {
$currentPageBrowserPage = (int) $parameters['currentPage'] ?: 0;
}
if ($currentPageBrowserPage > 0) {
$this->request->setArgument('currentPageBrowserPage', $currentPageBrowserPage);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment