diff --git a/webapp/controller/BattleController.class.php b/webapp/controller/BattleController.class.php index 3492a83d..f8b5d727 100644 --- a/webapp/controller/BattleController.class.php +++ b/webapp/controller/BattleController.class.php @@ -273,9 +273,11 @@ class BattleController extends BaseAuthedController { $chipPageDb = ChipPage::find($userPresetInfo['presetInfo']['chip_page']); $info['chip_page'] = ChipPage::toDtoBattle($chipPageDb); $battleDb = Battle::find($account_id); - $battleData = json_decode($battleDb['battle_data'], true); - $seasonBattleData = isset($battleData) ? getXVal($battleData, 'data', array()) : array(); - $info['battle_times'] = getXVal($seasonBattleData, 'total_battle_times', 0); + if ($battleDb){ + $battleData = json_decode($battleDb['battle_data'], true); + $seasonBattleData = isset($battleData) ? getXVal($battleData, 'data', array()) : array(); + $info['battle_times'] = getXVal($seasonBattleData, 'total_battle_times', 0); + } }else{ $info['errcode'] = 51; @@ -294,16 +296,16 @@ class BattleController extends BaseAuthedController { } } - { - for ($i = 1; $i <= 2; ++$i) { - if (isset($info['weapon_uuid' . $i])) { - $gunDb = Gun::findByAccountId($account_id, $info['weapon_uuid' . $i]); - if ($gunDb) { - $info['weapon_dto' . $i] = Gun::toDto($gunDb); - } - } - } - } +// { +// for ($i = 1; $i <= 2; ++$i) { +// if (isset($info['weapon_uuid' . $i])) { +// $gunDb = Gun::findByAccountId($account_id, $info['weapon_uuid' . $i]); +// if ($gunDb) { +// $info['weapon_dto' . $i] = Gun::toDto($gunDb); +// } +// } +// } +// } { $itemDb = Bag::findEx($account_id, V_ITEM_REVIVE_COIN); diff --git a/webapp/services/AwardService.php b/webapp/services/AwardService.php index 4b4cffed..83a1f85a 100644 --- a/webapp/services/AwardService.php +++ b/webapp/services/AwardService.php @@ -17,6 +17,9 @@ class AwardService extends BaseService { } } $itemMeta = Item::get($itemId); + if (!$itemMeta){ + return; + } if (!in_array( $itemMeta['type'],array( Item::RANDOM_BOX_TYPE,