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'] . "";