Skip to content

Commit

Permalink
- fixed PHP notice "Undefined index"
Browse files Browse the repository at this point in the history
  • Loading branch information
exodus4d committed Apr 8, 2018
1 parent fff8014 commit 5285c86
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/Main/Formatter/SubscriptionFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ static function groupCharactersDataBySystem(array $charactersData) : array {
$data = [];
foreach($charactersData as $characterId => $characterData){
// check if characterData has an active log (active system for character)
$systemId = (int)$characterData['log']['system']['id'];
$systemId = 0;
if(isset($characterData['log']['system']['id'])){
$systemId = (int)$characterData['log']['system']['id'];
}

if( !isset($data[$systemId]) ){
$systemData = (object)[];
$systemData->id = $systemId;
Expand Down

0 comments on commit 5285c86

Please sign in to comment.