From 37c6a942aedf518aff10244b16e905c225c5a1b6 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 17:38:19 +0800 Subject: [PATCH] 1 --- webapp/controller/MatchController.class.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index f2d790a1..c532c843 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -119,12 +119,15 @@ class MatchController extends BaseAuthedController { $currMatchDb = $this->readCurrMatchTeam($r); if (empty($currMatchDb)) { $currMatchDb = array( - 'current_team' => $teamUuid, - 'match_time' => $this->_getNowTime() + $teamUuid => array( + 'current_team' => $teamUuid, + 'match_time' => $this->_getNowTime() + ) ); $r->set(MATCH_CURRENT_TEAM_KEY, json_encode($currMatchDb)); $this->refreshKeyExpire($r, MATCH_CURRENT_TEAM_KEY, 1000*600); } else { + $currMatchDb = json_decode($currMatchDb, true); if ($currMatchDb['current_team'] != $teamUuid) { $this->matchOk($r, $teamUuid, $currMatchDb); $this->fillMatchInfo($r, $teamUuid, $matchInfo, $this->readMatchOk($r, $teamUuid));