diff --git a/index.php b/index.php index 8d553c7..44e2edb 100644 --- a/index.php +++ b/index.php @@ -31,7 +31,10 @@ $json = json_decode($res->body, true); - $twig->addGlobal('playerCount', count($json)); + if($json != null) { + $twig->addGlobal('playerCount', count($json)); + } + $twig->addGlobal('nations', $nations); $router->get('/', function() {