Skip to content

Commit

Permalink
Check for SQL errors when requesting game tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jul 5, 2010
1 parent d2789a6 commit 739b5c3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion steamtags.php
Expand Up @@ -42,14 +42,18 @@ function load_profile_game_tags($profile)
$sql = "select appid, tag from gametags where steamid=$id" .
" and deleted is null order by appid";
$query = do_dbquery($sql);
// !!! FIXME: check for db error here!
if ($query === false)
return false;

while ( ($row = db_fetch_array($query)) != false )
{
$game = $gamelist[$row['appid']];
if (!isset($game))
continue; // maybe it was a free weekend game they don't own now?
$game['tags'][] = $row['tag'];
} // while

db_free_result($query);
return true;
} // load_profile_game_tags

Expand Down

0 comments on commit 739b5c3

Please sign in to comment.