From 84b0233731a8012b743bd62a7b2e3bb74279f8ef Mon Sep 17 00:00:00 2001 From: hujiabin <519660157@qq.com> Date: Fri, 26 Apr 2024 15:57:12 +0800 Subject: [PATCH] 1 --- webapp/controller/RankingController.class.php | 2 +- webapp/models/ChipPage.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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){