From c47ad757621ea381d46c041c6c437624e24b0e01 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 16 Apr 2024 11:52:53 +0800 Subject: [PATCH] 1 --- webapp/controller/BattleController.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/webapp/controller/BattleController.class.php b/webapp/controller/BattleController.class.php index a862fd8d..9a61ae82 100644 --- a/webapp/controller/BattleController.class.php +++ b/webapp/controller/BattleController.class.php @@ -268,9 +268,10 @@ class BattleController extends BaseAuthedController { } } } + error_log(json_encode($realPlayerHash)); $accountIdPair = array(); - foreach ($realPlayerHash as $accountId) { - foreach ($realPlayerHashCopy as $accountIdCopy) { + foreach ($realPlayerHash as $accountId => $val) { + foreach ($realPlayerHashCopy as $accountIdCopy => $valCopy) { if ($accountId != $accountIdCopy) { $accountId1 = $accountId; $accountId2 = $accountIdCopy; @@ -285,12 +286,13 @@ class BattleController extends BaseAuthedController { } } } + error_log(json_encode($accountIdPair)); $nowTime = myself()->_getNowTime(); foreach ($accountIdPair as $pair) { $accountId1 = $pair[0]; $accountId2 = $pair[1]; SqlHelper::Upsert( - myself()->__getRelationDbMysql(), + myself()->_getRelationDbMysql(), 't_recent_battle', array( 'account_id1' => $accountId1,