CityHelper에 '국가명' 한정으론 오작동할 수 있으므로, fallback 추가
This commit is contained in:
@@ -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){
|
||||||
|
|||||||
Reference in New Issue
Block a user