From 9c35f1e244bd11bcc4bfd2d1adc2d8ee29278f21 Mon Sep 17 00:00:00 2001 From: hujiabin <519660157@qq.com> Date: Fri, 9 Aug 2024 12:02:15 +0800 Subject: [PATCH] 1 --- webapp/controller/RankingController.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webapp/controller/RankingController.class.php b/webapp/controller/RankingController.class.php index cf0bce6e..d8d52d23 100644 --- a/webapp/controller/RankingController.class.php +++ b/webapp/controller/RankingController.class.php @@ -122,11 +122,13 @@ class RankingController extends BaseAuthedController { private function _extractUserInfo($row){ if ($row){ + $hero_id = 0; $hero_skin = 0; $heroDb = Hero::findByAccountId($row['account_id'],$row['hero_id']); if ($heroDb){ + $hero_id = $heroDb['hero_id']; $skinDb = HeroSkin::findByAccountId($row['account_id'],$heroDb['skin_id']); $hero_skin = $skinDb ? $skinDb['skin_id']:0; } @@ -138,7 +140,7 @@ class RankingController extends BaseAuthedController { 'head_id' => $row['head_id'], 'head_frame' => $row['head_frame'], 'hero_skin' => $hero_skin, - 'hero_id' => $row['hero_id'], + 'hero_id' => $hero_id, ); }else{ $info = array();