From 21c9103d1b521c9766fef225e2e13b81eb6961e9 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 29 Dec 2023 14:28:13 +0800 Subject: [PATCH] 1 --- webapp/controller/BattleController.class.php | 3 ++- webapp/controller/MatchController.class.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/webapp/controller/BattleController.class.php b/webapp/controller/BattleController.class.php index d55b5923..5ff03abc 100644 --- a/webapp/controller/BattleController.class.php +++ b/webapp/controller/BattleController.class.php @@ -436,7 +436,8 @@ class BattleController extends BaseAuthedController { { $rawData = file_get_contents('php://input'); error_log($rawData); - $sign = strstr($rawData, '|', true); + $headStr = strstr($rawData, '|', true); + $sign = strstr($headStr, ':', true); $customData = strstr($rawData, '|'); $customData = substr($customData, 1); error_log(json_encode(array( diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index 167a90e1..79b3804a 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -144,7 +144,7 @@ class MatchController extends BaseAuthedController { } else { foreach ($currMatchDb as $key => $val) { $tmpTeamDb = $this->readTeamDb($r, $key); - if (!empty($tmpTeamDb) || $this->_getNowTime() - $tmpTeamDb['match_time'] > 120) { + if (!empty($tmpTeamDb) && $this->_getNowTime() - $val['match_time'] > 120) { array_push($delTeams, $key); } else { $found = false;