From 0bc3f6075bf43f412dfa4e4e85223d2dc61dc03e Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 6 Jun 2022 09:30:58 +0800 Subject: [PATCH] 1 --- webapp/services/MissionService.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/webapp/services/MissionService.php b/webapp/services/MissionService.php index decfef40..79c84db1 100644 --- a/webapp/services/MissionService.php +++ b/webapp/services/MissionService.php @@ -647,13 +647,16 @@ class MissionService extends BaseService { { //武器 ++$gunCount; - array_push( - $mission['objects'], - array( - 'type' => $type, - 'id' => $id - ) - ); + $gunDb = Gun::find($id); + if ($gunDb) { + array_push( + $mission['objects'], + array( + 'type' => $type, + 'id' => $id + ) + ); + } } break; case 1: