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;