diff --git a/hwe/func_converter.php b/hwe/func_converter.php index 3c9b3c98..4d34e290 100644 --- a/hwe/func_converter.php +++ b/hwe/func_converter.php @@ -223,7 +223,10 @@ function getSpecialInfo(?int $type):?string{ return $infoText[$type][1]??null; } -function getNationType(int $type) { +function getNationType(?int $type) { + if($type === null){ + return '-'; + } static $cache = []; if(\key_exists($type, $cache)){ return $cache[$type]; diff --git a/src/sammo/Util.php b/src/sammo/Util.php index df473fdd..41e84a7d 100644 --- a/src/sammo/Util.php +++ b/src/sammo/Util.php @@ -350,6 +350,8 @@ class Util extends \utilphp\util shuffle($keys); + $new = []; + foreach($keys as $key) { $new[$key] = $array[$key]; }