Skip to content

Commit

Permalink
Fixes for strict types
Browse files Browse the repository at this point in the history
  • Loading branch information
thekabal committed Mar 21, 2017
1 parent 8b0ea48 commit 7a8af2c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions lrscan.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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 "</td></tr>";
echo "<tr bgcolor=\"$tkireg->color_line1\"><td><strong>" . $langvars['l_mines'] . "</strong></td></tr>";
Expand Down

0 comments on commit 7a8af2c

Please sign in to comment.