Skip to content

Commit

Permalink
Improvements thanks to Scrutinizer
Browse files Browse the repository at this point in the history
  • Loading branch information
thekabal committed Sep 20, 2021
1 parent 36b4772 commit 68530cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions classes/PlanetReportCE.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ public static function collectCredits(\PDO $pdo_db, string $lang, array $planeta
public static function takeCredits(\PDO $pdo_db, string $lang, int $planet_id): string
{
$langvars = Translate::load($pdo_db, $lang, array('common', 'planet_report', 'regional'));
$playerinfo = array();
$planetinfo = array();

// Get playerinfo from database
$playerinfo = array();
$players_gateway = new \Tki\Players\PlayersGateway($pdo_db);
$playerinfo = $players_gateway->selectPlayerInfo($_SESSION['username']);

// Get planetinfo from database
$planetinfo = array();
$sql = "SELECT * FROM ::prefix::planets WHERE planet_id = :planet_id LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$sql_test = \Tki\Db::logDbErrors($pdo_db, $sql, __LINE__, __FILE__);
Expand Down
2 changes: 1 addition & 1 deletion classes/Registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public function loadFromIni(): void
// Which ini file is hard-coded for now
// FUTURE: When we get multiple game support, we may need to change it
$ini_keys = parse_ini_file('config/classic_config.ini', true, INI_SCANNER_TYPED);
if (is_array($ini_keys))
if ($ini_keys !== false)
{
foreach ($ini_keys as $config_line)
{
Expand Down

0 comments on commit 68530cf

Please sign in to comment.