From 30f1631991a059b119c81e0d2dadecac9899f9da Mon Sep 17 00:00:00 2001
From: Elmar Ludwig <elmar.ludwig@uni-osnabrueck.de>
Date: Thu, 23 Jun 2022 11:48:04 +0000
Subject: [PATCH] don't rely on parent::redirect() accepting multiple
 arguments, re #711

Merge request studip/studip!721
---
 app/controllers/course/timesrooms.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/controllers/course/timesrooms.php b/app/controllers/course/timesrooms.php
index 18792bb626a..081608a7627 100644
--- a/app/controllers/course/timesrooms.php
+++ b/app/controllers/course/timesrooms.php
@@ -1475,9 +1475,9 @@ class Course_TimesroomsController extends AuthenticatedController
     public function redirect($to)
     {
         $arguments = func_get_args();
+        $url       = call_user_func_array('parent::url_for', $arguments);
 
         if (Request::isXhr()) {
-            $url       = call_user_func_array('parent::url_for', $arguments);
             $index_url = $this->action_url('index');
 
             if (mb_strpos($url, $index_url) !== false) {
@@ -1485,7 +1485,7 @@ class Course_TimesroomsController extends AuthenticatedController
             }
         }
 
-        return call_user_func_array('parent::redirect', $arguments);
+        parent::redirect($url);
     }
 
     /**
-- 
GitLab