From c60f30a6308f18659a9a13e0eb0d5e3ebc043721 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 d6507175fd9..147078a97cc 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();
                     ?>
diff --git a/app/views/fachabschluss/faecher/index.php b/app/views/fachabschluss/faecher/index.php
index dcd9134db8f..f2ba7a44271 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();
                         ?>
diff --git a/app/views/lvgruppen/lvgruppen/index.php b/app/views/lvgruppen/lvgruppen/index.php
index 2ce6014ba7e..53c09be398d 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();
                     ?>
diff --git a/app/views/module/module/index.php b/app/views/module/module/index.php
index 6cd63e9cade..1028a2db120 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();
                     ?>
diff --git a/app/views/search/module/index.php b/app/views/search/module/index.php
index 8eac916000f..a2d5c194c08 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();
                 ?>
diff --git a/app/views/shared/contacts/index.php b/app/views/shared/contacts/index.php
index 660426309db..7eecac555b2 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();
                     ?>
-- 
GitLab