From ee54493761e80a32ede3f13ad928434beef26437 Mon Sep 17 00:00:00 2001
From: Jan-Hendrik Willms <tleilax+studip@gmail.com>
Date: Fri, 9 Aug 2024 11:43:41 +0000
Subject: [PATCH] fix notice about only passing variables by reference, fixes
 #4472

Closes #4472

Merge request studip/studip!3260
---
 app/views/fachabschluss/abschluesse/index.php | 2 +-
 app/views/fachabschluss/faecher/index.php     | 2 +-
 app/views/lvgruppen/lvgruppen/index.php       | 2 +-
 app/views/module/module/index.php             | 2 +-
 app/views/search/module/index.php             | 2 +-
 app/views/shared/contacts/index.php           | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/app/views/fachabschluss/abschluesse/index.php b/app/views/fachabschluss/abschluesse/index.php
index 2b390001d1c..4fba4d50bd1 100644
--- a/app/views/fachabschluss/abschluesse/index.php
+++ b/app/views/fachabschluss/abschluesse/index.php
@@ -60,7 +60,7 @@
                         $pagination->set_attribute('perPage', MVVController::$items_per_page);
                         $pagination->set_attribute('num_postings', $count);
                         $pagination->set_attribute('page', $page);
-                        $page_link = reset(explode('?', $controller->action_url('index'))) . '?page_abschluesse=%s';
+                        $page_link = explode('?', $controller->action_url('index'))[0] . '?page_abschluesse=%s';
                         $pagination->set_attribute('pagelink', $page_link);
                         echo $pagination->render('shared/pagechooser');
                     ?>
diff --git a/app/views/fachabschluss/faecher/index.php b/app/views/fachabschluss/faecher/index.php
index 352dcb7c34d..b07b514eb27 100644
--- a/app/views/fachabschluss/faecher/index.php
+++ b/app/views/fachabschluss/faecher/index.php
@@ -61,7 +61,7 @@
                         $pagination->set_attribute('perPage', MVVController::$items_per_page);
                         $pagination->set_attribute('num_postings', $count);
                         $pagination->set_attribute('page', $page);
-                        $page_link = reset(explode('?', $controller->action_url('index'))) . '?page_faecher=%s';
+                        $page_link = explode('?', $controller->action_url('index'))[0] . '?page_faecher=%s';
                         $pagination->set_attribute('pagelink', $page_link);
                         echo $pagination->render('shared/pagechooser');
                         ?>
diff --git a/app/views/lvgruppen/lvgruppen/index.php b/app/views/lvgruppen/lvgruppen/index.php
index d5ab6a8dfa9..939fe23c9fe 100644
--- a/app/views/lvgruppen/lvgruppen/index.php
+++ b/app/views/lvgruppen/lvgruppen/index.php
@@ -89,7 +89,7 @@
                     $pagination->set_attribute('perPage', MVVController::$items_per_page);
                     $pagination->set_attribute('num_postings', $count);
                     $pagination->set_attribute('page', $page);
-                    $page_link = reset(explode('?', $controller->action_url('index'))) . '?page_lvgruppen=%s';
+                    $page_link = explode('?', $controller->action_url('index'))[0] . '?page_lvgruppen=%s';
                     $pagination->set_attribute('pagelink', $page_link);
                     echo $pagination->render("shared/pagechooser");
                     ?>
diff --git a/app/views/module/module/index.php b/app/views/module/module/index.php
index 7f3df8bcf45..196373fba3e 100644
--- a/app/views/module/module/index.php
+++ b/app/views/module/module/index.php
@@ -27,7 +27,7 @@
                     $pagination->set_attribute('perPage', MVVController::$items_per_page);
                     $pagination->set_attribute('num_postings', $count);
                     $pagination->set_attribute('page', $page);
-                    $page_link = reset(explode('?', $controller->action_url('index'))) . '?page_module=%s';
+                    $page_link = explode('?', $controller->action_url('index'))[0] . '?page_module=%s';
                     $pagination->set_attribute('pagelink', $page_link);
                     echo $pagination->render('shared/pagechooser');
                     ?>
diff --git a/app/views/search/module/index.php b/app/views/search/module/index.php
index c072cf07b11..416dd0a8631 100644
--- a/app/views/search/module/index.php
+++ b/app/views/search/module/index.php
@@ -51,7 +51,7 @@
                     $pagination->set_attribute('perPage', MVVController::$items_per_page);
                     $pagination->set_attribute('num_postings', $count);
                     $pagination->set_attribute('page', $page);
-                    $page_link = reset(explode('?', $controller->action_url('index'))) . '?page_module=%s';
+                    $page_link = explode('?', $controller->action_url('index'))[0] . '?page_module=%s';
                     $pagination->set_attribute('pagelink', $page_link);
                     echo $pagination->render('shared/pagechooser');
                 ?>
diff --git a/app/views/shared/contacts/index.php b/app/views/shared/contacts/index.php
index 60735740733..297de31b7bd 100644
--- a/app/views/shared/contacts/index.php
+++ b/app/views/shared/contacts/index.php
@@ -82,7 +82,7 @@
                     $pagination->set_attribute('perPage', MVVController::$items_per_page);
                     $pagination->set_attribute('num_postings', $count);
                     $pagination->set_attribute('page', $page);
-                    $page_link = reset(explode('?', $controller->action_url('index'))) . '?page_contacts=%s';
+                    $page_link = explode('?', $controller->action_url('index'))[0] . '?page_contacts=%s';
                     $pagination->set_attribute('pagelink', $page_link);
                     echo $pagination->render('shared/pagechooser');
                     ?>
-- 
GitLab