From d672ce4d8079ad58f6db4c23b9ddccce6b3db04f Mon Sep 17 00:00:00 2001 From: hide_d Date: Tue, 12 Oct 2021 01:43:54 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20set=5Ferror=5Fhandler=EB=A5=BC=20?= =?UTF-8?q?=EB=AA=BB=EC=9E=A1=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0=20=EA=B8=B0=ED=83=80=20=EC=86=8C=EC=86=8C=ED=95=9C=20?= =?UTF-8?q?=EB=B2=84=EA=B7=B8=20-=20=ED=94=BC=EC=9E=A5=ED=8C=8C=EC=9E=A5?= =?UTF-8?q?=20=EC=9E=85=EB=A0=A5=EC=8B=9C=20warning=EC=9D=84=20=EA=B3=84?= =?UTF-8?q?=EC=86=8D=20=EC=9D=BC=EC=9C=BC=ED=82=A4=EB=8A=94=20=EB=B2=84?= =?UTF-8?q?=EA=B7=B8(=EB=8F=99=EC=9E=91=20=EB=AC=B8=EC=A0=9C=EB=8A=94=20?= =?UTF-8?q?=EC=97=86=EC=9D=8C)=20-=20=ED=86=A0=EB=84=88=EB=A8=BC=ED=8A=B8?= =?UTF-8?q?=EC=97=90=EC=84=9C=20=EC=8A=B9=EB=A6=AC,=ED=8C=A8=EB=B0=B0,?= =?UTF-8?q?=EB=AC=B4=EC=8A=B9=EB=B6=80=20=EC=99=B8=EC=97=90=20MustNotBeRea?= =?UTF-8?q?chedException=EC=9D=B4=20throw=EB=90=98=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EC=9D=8C(=EB=8F=99=EC=9E=91=20=EB=AC=B8=EC=A0=9C=EB=8A=94=20?= =?UTF-8?q?=EC=97=86=EC=9D=8C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- f_config/config.php | 32 +++++++++++------------ hwe/func_tournament.php | 2 +- hwe/sammo/Command/Nation/che_피장파장.php | 3 +++ 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/f_config/config.php b/f_config/config.php index 9563f586..01365cd0 100644 --- a/f_config/config.php +++ b/f_config/config.php @@ -15,35 +15,35 @@ ini_set("session.gc_maxlifetime", '604800'); // seconds function getFriendlyErrorType($type) { switch ($type) { - case E_ERROR: // 1 // + case E_ERROR: // 1 // return 'E_ERROR'; - case E_WARNING: // 2 // + case E_WARNING: // 2 // return 'E_WARNING'; - case E_PARSE: // 4 // + case E_PARSE: // 4 // return 'E_PARSE'; - case E_NOTICE: // 8 // + case E_NOTICE: // 8 // return 'E_NOTICE'; - case E_CORE_ERROR: // 16 // + case E_CORE_ERROR: // 16 // return 'E_CORE_ERROR'; - case E_CORE_WARNING: // 32 // + case E_CORE_WARNING: // 32 // return 'E_CORE_WARNING'; - case E_COMPILE_ERROR: // 64 // + case E_COMPILE_ERROR: // 64 // return 'E_COMPILE_ERROR'; - case E_COMPILE_WARNING: // 128 // + case E_COMPILE_WARNING: // 128 // return 'E_COMPILE_WARNING'; - case E_USER_ERROR: // 256 // + case E_USER_ERROR: // 256 // return 'E_USER_ERROR'; - case E_USER_WARNING: // 512 // + case E_USER_WARNING: // 512 // return 'E_USER_WARNING'; - case E_USER_NOTICE: // 1024 // + case E_USER_NOTICE: // 1024 // return 'E_USER_NOTICE'; - case E_STRICT: // 2048 // + case E_STRICT: // 2048 // return 'E_STRICT'; - case E_RECOVERABLE_ERROR: // 4096 // + case E_RECOVERABLE_ERROR: // 4096 // return 'E_RECOVERABLE_ERROR'; - case E_DEPRECATED: // 8192 // + case E_DEPRECATED: // 8192 // return 'E_DEPRECATED'; - case E_USER_DEPRECATED: // 16384 // + case E_USER_DEPRECATED: // 16384 // return 'E_USER_DEPRECATED'; } return "{$type}"; @@ -134,7 +134,7 @@ function logErrorByCustomHandler(int $errno, string $errstr, string $errfile, in getExceptionTraceAsString($e) ); } -set_error_handler("\sammo\logErrorByCustomHandler"); +set_error_handler("\\sammo\\logErrorByCustomHandler"); function logExceptionByCustomHandler(\Throwable $e) diff --git a/hwe/func_tournament.php b/hwe/func_tournament.php index dad46146..be0b5352 100644 --- a/hwe/func_tournament.php +++ b/hwe/func_tournament.php @@ -1132,7 +1132,7 @@ function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { $gen1resKey = 'd'; $gen2resKey = 'd'; break; - default: new MustNotBeReachedException(); + default: throw new MustNotBeReachedException(); } $db->update('rank_data', [ diff --git a/hwe/sammo/Command/Nation/che_피장파장.php b/hwe/sammo/Command/Nation/che_피장파장.php index c9737bc7..9083474d 100644 --- a/hwe/sammo/Command/Nation/che_피장파장.php +++ b/hwe/sammo/Command/Nation/che_피장파장.php @@ -33,6 +33,9 @@ class che_피장파장 extends Command\NationCommand{ if(!key_exists('destNationID', $this->arg)){ return false; } + if(!key_exists('commandType', $this->arg)){ + return false; + } $destNationID = $this->arg['destNationID']; $commandType = $this->arg['commandType'];