diff --git a/webapp/controller/RankingController.class.php b/webapp/controller/RankingController.class.php index 485fe814..10c28643 100644 --- a/webapp/controller/RankingController.class.php +++ b/webapp/controller/RankingController.class.php @@ -129,7 +129,7 @@ class RankingController extends BaseAuthedController { if ($heroDb){ $heroItemId = $heroDb['hero_id']; $skinDb = HeroSkin::findByAccountId($row['account_id'],$heroItemId); - $hero_skin = $skinDb['skin_id']; + $hero_skin = $skinDb ? $skinDb['skin_id']:0; } $info = array( diff --git a/webapp/models/ChipPage.php b/webapp/models/ChipPage.php index dbd45ca7..9786e749 100644 --- a/webapp/models/ChipPage.php +++ b/webapp/models/ChipPage.php @@ -67,6 +67,9 @@ class ChipPage extends BaseModel } public static function toDtoBattle($row){ + if (!$row){ + return $row; + } $data = emptyReplace(json_decode($row['data'], true), array()); if ($data){ foreach ($data as &$value){