Skip to content

Commit

Permalink
Merge pull request #112 from Sindious/master
Browse files Browse the repository at this point in the history
GetPlayerLevelDetails-error-handeling
  • Loading branch information
nicekiwi authored Jan 24, 2021
2 parents 4f4eb15 + 6f726e2 commit 09974ab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Syntax/SteamApi/Steam/Player.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ public function GetSteamLevel()
public function GetPlayerLevelDetails()
{
$details = $this->GetBadges();

if(count((array)$details) == 0){
return NULL;
}

$details = new Level($details);

Expand Down

0 comments on commit 09974ab

Please sign in to comment.