From 7a8af2c19eb248e2fa744c6e0827287673b6829f Mon Sep 17 00:00:00 2001 From: Patrick Date: Mon, 20 Mar 2017 19:00:23 -0600 Subject: [PATCH] Fixes for strict types --- lrscan.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lrscan.php b/lrscan.php index 8948de2d8..673217855 100644 --- a/lrscan.php +++ b/lrscan.php @@ -133,13 +133,13 @@ Tki\Db::LogDbErrors($pdo_db, $resultSDb, __LINE__, __FILE__); $defM = $resultSDa->fields; - if ($defM['mines'] === null) + if ($defM === null) { $defM['mines'] = 0; } $defF = $resultSDb->fields; - if ($defF['fighters'] === null) + if ($defF === null) { $defF['fighters'] = 0; } @@ -404,7 +404,17 @@ $resultSDb = $db->Execute("SELECT SUM(quantity) as fighters from {$db->prefix}sector_defense WHERE sector_id = ? and defense_type = 'F';", array($sector)); Tki\Db::LogDbErrors($pdo_db, $resultSDb, __LINE__, __FILE__); $defM = $resultSDa->fields; + + if ($defM['mines'] === null) + { + $defM['mines'] = 0; + } + $defF = $resultSDb->fields; + if ($defF['fighters'] === null) + { + $defF['fighters'] = 0; + } echo ""; echo "color_line1\">" . $langvars['l_mines'] . "";