Skip to content

Commit

Permalink
Fixing issue in index.php with undefined index when first connecting
Browse files Browse the repository at this point in the history
* This closes issue #3
  • Loading branch information
viperman1271 committed Apr 17, 2017
1 parent 191ce33 commit 6d6a6f3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@
<div class="small-box bg-aqua">
<div class="inner">
<?php
echo ' <h3>' . count($stats['users']) . '</h3>';
$connected_clients = 0;
if(array_key_exists('users', $stats))
{
$connected_clients = count($stats['users']);
}
echo '
<h3>' . $connected_clients . '</h3>
';
?>
<p>Connected Clients</p>
</div>
Expand Down

0 comments on commit 6d6a6f3

Please sign in to comment.