From 4901a2d3847e0e0d07e2473d0cc63af7b9346f5d Mon Sep 17 00:00:00 2001 From: Hide_D Date: Sun, 12 Mar 2023 16:37:12 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EA=B1=B0=EB=B3=91=20=EC=8B=9C=20?= =?UTF-8?q?=EC=9D=B8=EA=B5=AC=20=EC=A0=95=EB=B3=B4=EB=A5=BC=200=EC=9D=B4?= =?UTF-8?q?=20=EC=95=84=EB=8B=88=EB=9D=BC=20null=EB=A1=9C=20=EB=B3=B4?= =?UTF-8?q?=EB=82=B4=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/API/General/GetFrontInfo.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hwe/sammo/API/General/GetFrontInfo.php b/hwe/sammo/API/General/GetFrontInfo.php index 96877b0b..86a2e033 100644 --- a/hwe/sammo/API/General/GetFrontInfo.php +++ b/hwe/sammo/API/General/GetFrontInfo.php @@ -245,6 +245,14 @@ class GetFrontInfo extends \sammo\BaseAPI $nationID ); + if($nationPopulation['cityCnt'] == 0){ + $nationPopulation = [ + 'cityCnt' => 0, + 'now' => 0, + 'max' => 0 + ]; + } + //XXX: 매번 더하는가? $nationCrew = $db->queryFirstRow( 'SELECT COUNT(*) as generalCnt, CAST(SUM(crew) AS INTEGER) as `now`,CAST(SUM(leadership)*100 AS INTEGER) as `max` from general where nation=%i AND npc != 5',