diff --git a/src/Controller/PositionController.php b/src/Controller/PositionController.php index 900b1c0..24d4b13 100644 --- a/src/Controller/PositionController.php +++ b/src/Controller/PositionController.php @@ -24,7 +24,8 @@ class PositionController implements ControllerInterface public function run(): ViewBase { if (!isset($_SESSION['state']) || $_SESSION['state']['mapId'] !== $this->mapId) { - return new JsonView(['error' => 'No valid session found!']); + $data = ['error' => 'No valid session found!']; + return new JsonView($data); } if (count($_SESSION['state']['rounds']) === 0) {