From ccf9bf261a8c58f263815c0998dd7abd775127fc Mon Sep 17 00:00:00 2001 From: yangduo Date: Thu, 19 Dec 2024 15:09:54 +0800 Subject: [PATCH] fix --- webapp/controller/ActivityController.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webapp/controller/ActivityController.class.php b/webapp/controller/ActivityController.class.php index cf2ebda..563241b 100644 --- a/webapp/controller/ActivityController.class.php +++ b/webapp/controller/ActivityController.class.php @@ -442,18 +442,18 @@ class ActivityController{ } if ($cur_cost > 0) { - $row = $conn->execQueryOne( + $userrow = $conn->execQueryOne( 'SELECT diamond_num, first_gift, free_coin, free_diamond FROM user WHERE accountid=:accountid;', array( ':accountid' => $account_id ) ); - if (!$row) { + if (!$userrow) { phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家'); return; } //扣除钻石 - if ($row['diamond_num'] < $cur_cost) { + if ($userrow['diamond_num'] < $cur_cost) { phpcommon\sendError(ERR_USER_BASE + 3, '钻石不足'); return; }