Skip to content

Commit 8073095

Browse files
committed
Merge pull request #12 from Amegatron/patch-1
Fix for empty games list (Player::GetOwnedGames)
2 parents f8cd104 + c92420b commit 8073095

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Syntax/SteamApi/Steam/Player.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function GetOwnedGames($includeAppInfo = true, $includePlayedFreeGames =
9090
$client = $this->getServiceResponse($arguments);
9191

9292
// Clean up the games
93-
$games = $this->convertToObjects($client->games);
93+
$games = $this->convertToObjects(isset($client->games) ? $client->games : array());
9494

9595
return $games;
9696
}
@@ -155,4 +155,4 @@ private function convertGames($games)
155155

156156
return $convertedGames;
157157
}
158-
}
158+
}

0 commit comments

Comments
 (0)