Skip to content

Commit

Permalink
Log an error if the server gave us an empty response object.
Browse files Browse the repository at this point in the history
  • Loading branch information
LswaN58 committed May 8, 2024
1 parent 84129e9 commit 7f96b8a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions site/gamedata.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@

if (isset($response_obj) && $response_obj->{'success'}) {
$game_files = GameFileInfo::fromObj($response_obj->{'data'});
if ($game_files == null) {
$err_str = "Got empty game_files from request that had success=".$response_obj->{'success'}." and data=".json_encode($response_obj->{'data'});
error_log($err_str);
}

$selected_year = isset($game_files) ? $game_files->getLastYear() : '';
$selected_month = isset($game_files) ? $game_files->getLastMonth() : '';
Expand Down

0 comments on commit 7f96b8a

Please sign in to comment.