Skip to content

Commit

Permalink
Contets returning NULL
Browse files Browse the repository at this point in the history
When there is no active contest, function would try to access null type
  • Loading branch information
fajnyCreeper committed Jun 7, 2020
1 parent f9ac92d commit b11bebf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion active.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
function GetActiveId($bot)
{
$res = $bot->contestsList();

if (is_null($res))
return false;

$contestId = $res["active"]["_id"];

return $contestId;
}

0 comments on commit b11bebf

Please sign in to comment.