Skip to content

Commit

Permalink
Merge pull request #84 from syntaxerrors/nicekiwi-patch-1
Browse files Browse the repository at this point in the history
Fix #82, empty object breaks GetPlayerSummaries
  • Loading branch information
nicekiwi authored Mar 4, 2019
2 parents 7824404 + 6073f10 commit aa443d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Syntax/SteamApi/Steam/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ protected function convertToObjects($players)
$cleanedPlayers = [];

foreach ($players as $player) {
$cleanedPlayers[] = new PlayerContainer($player);
if(property_exists($player, 'steamid')) {
$cleanedPlayers[] = new PlayerContainer($player);
}
}

return $cleanedPlayers;
Expand Down

0 comments on commit aa443d4

Please sign in to comment.