File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " fragland/minestat" ,
3
- "version" : " 3.0.0 " ,
3
+ "version" : " 3.0.1 " ,
4
4
"type" : " library" ,
5
5
"description" : " A Minecraft server status checker" ,
6
6
"keywords" : [" Minecraft" ," status" ],
Original file line number Diff line number Diff line change 21
21
22
22
class MineStat
23
23
{
24
- const VERSION = "3.0.0 " ; // MineStat version
24
+ const VERSION = "3.0.1 " ; // MineStat version
25
25
const NUM_FIELDS = 6 ; // number of values expected from server
26
26
const NUM_FIELDS_BETA = 3 ; // number of values expected from a 1.8b/1.3 server
27
27
const MAX_VARINT_SIZE = 5 ; // maximum number of bytes a varint can be
@@ -610,8 +610,8 @@ public function json_request()
610
610
$ this ->version = @$ json_data ['version ' ]['name ' ];
611
611
$ this ->motd = @$ json_data ['description ' ];
612
612
$ this ->strip_motd ();
613
- $ this ->current_players = (int )@$ json_data ['players ' ]['online ' ];
614
- $ this ->max_players = (int )@$ json_data ['players ' ]['max ' ];
613
+ $ this ->current_players = (int )@$ json_data ['players ' ]['online ' ] ?? - 1 ;
614
+ $ this ->max_players = (int )@$ json_data ['players ' ]['max ' ] ?? - 1 ;
615
615
$ this ->favicon_b64 = @$ json_data ['favicon ' ];
616
616
if (isset ($ this ->favicon_b64 ))
617
617
{
You can’t perform that action at this time.
0 commit comments