From e81075ef041f53b3a887ab7fcb2e16ff7bc6df8e Mon Sep 17 00:00:00 2001 From: hide_d Date: Fri, 29 Jun 2018 09:28:58 +0900 Subject: [PATCH] =?UTF-8?q?history=20=ED=95=A8=EC=88=98=20=EC=9D=B8?= =?UTF-8?q?=EC=9E=90=20=EC=A0=9C=ED=95=9C=20=EC=99=84=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func_history.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/hwe/func_history.php b/hwe/func_history.php index 9be0b23e..09aaa3f1 100644 --- a/hwe/func_history.php +++ b/hwe/func_history.php @@ -156,7 +156,10 @@ function pushOldNationStop(int $no, int $nationNo){ } //DB-based -function pushNationHistory($nation, $history) { +function pushNationHistory($nation, ?string $history) { + if(!$history){ + return; + } if(!$nation || !$nation['nation']){ return; } @@ -164,7 +167,10 @@ function pushNationHistory($nation, $history) { $history.'
', $nation['nation']); } -function pushGeneralHistory($me, $history) { +function pushGeneralHistory($me, ?string $history) { + if(!$history){ + return; + } DB::db()->query("UPDATE general set history=concat(%s, history) where no=%i", $history.'
', $me['no']); } @@ -174,7 +180,7 @@ function getGeneralHistoryAll(int $no) { return ConvertLog($history); } -function pushWorldHistory(array $history, $year=null, $month=null) { +function pushWorldHistory(?array $history, $year=null, $month=null) { if(!$history){ return; } @@ -221,7 +227,7 @@ function getWorldHistoryWithDate($year, $month) { } -function pushGeneralPublicRecord(array $history, $year=null, $month=null) { +function pushGeneralPublicRecord(?array $history, $year=null, $month=null) { if(!$history){ return; }