From eba1fe03484ef9bd2d5974bc18a0da48f2c0ef0b Mon Sep 17 00:00:00 2001
From: Jan-Hendrik Willms <tleilax+studip@gmail.com>
Date: Sat, 1 Jun 2024 07:37:38 +0000
Subject: [PATCH] fixes #4248

Closes #4248

Merge request studip/studip!3079
---
 lib/classes/StudipController.php | 3 +--
 lib/trails/Controller.php        | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/classes/StudipController.php b/lib/classes/StudipController.php
index 0643836c6b6..a908a477c37 100644
--- a/lib/classes/StudipController.php
+++ b/lib/classes/StudipController.php
@@ -649,8 +649,7 @@ abstract class StudipController extends Trails\Controller
         $args = func_get_args();
         $unconsumed = array_shift($args);
 
-        [$action, $extracted_args, $format] = $this->extract_action_and_args($unconsumed);
-        $this->format = isset($format) ? $format : 'html';
+        [$action, $extracted_args] = $this->extract_action_and_args($unconsumed);
         $this->current_action = $action;
         $args = array_merge($extracted_args, $args);
         $callable = $this->map_action($action);
diff --git a/lib/trails/Controller.php b/lib/trails/Controller.php
index bafb8db821a..19183806961 100644
--- a/lib/trails/Controller.php
+++ b/lib/trails/Controller.php
@@ -32,7 +32,7 @@ class Controller
     protected Response $response;
     protected bool $performed = false;
     protected Template|string|null $layout = null;
-    protected string $format = 'html';
+    private string $format = 'html';
 
     /**
      * @param Dispatcher $dispatcher the dispatcher who creates this instance
-- 
GitLab