From 59b93e007814f53b0df262eb5360820fd5a14035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Tue, 26 May 2020 21:27:15 +0200 Subject: [PATCH] MAPG-65 create variable so it can be a reference --- src/Controller/PositionController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) {