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();