CityHelper에 '국가명' 한정으론 오작동할 수 있으므로, fallback 추가

This commit is contained in:
2018-03-28 19:16:34 +09:00
parent 907ba0b26e
commit e8e18c059f
+2 -1
View File
@@ -1,6 +1,7 @@
<?php <?php
namespace sammo\Scenario; namespace sammo\Scenario;
use \sammo\DB; use \sammo\DB;
use \sammo\Util;
class CityHelper{ class CityHelper{
//Just Helper //Just Helper
@@ -51,7 +52,7 @@ class CityHelper{
self::generateCache(); self::generateCache();
} }
return self::$listByNation[$nationID]; return Util::array_get(self::$listByNation[$nationID], []);
} }
public static function getCity(int $cityID){ public static function getCity(int $cityID){