From 22c4ec2d4ae611e1789e2cbb38d616b06cf53e01 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 26 Aug 2018 18:24:35 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B5=AD=EA=B0=80=20=EC=84=B1=ED=96=A5=20?= =?UTF-8?q?=EC=B6=9C=EB=A0=A5=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func_converter.php | 5 ++++- src/sammo/Util.php | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) 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]; }