diff --git a/lib/game.class.php b/lib/game.class.php index f6d3219..79b023c 100644 --- a/lib/game.class.php +++ b/lib/game.class.php @@ -833,6 +833,7 @@ function to_json() // PHP IIFE 'players' => call_user_func(function($clients) { + if ($clients === NULL) return array(); // Filter out clients with players. $clients = array_filter($clients, function($client) { return isset($client['[Player]']);