Skip to content

Commit

Permalink
TimingsCommand: workaround a PHPStan type specifying bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dktapps committed Jun 10, 2020
1 parent 376926c commit 409c8c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pocketmine/command/defaults/TimingsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ public function onCompletion(Server $server){
$server->getLogger()->logException($result);
return;
}
if(isset($result[0]) && is_array($response = json_decode($result[0], true)) && isset($response["id"])){
$response = json_decode($result[0], true);
if(is_array($response) && isset($response["id"])){
Command::broadcastCommandMessage($sender, new TranslationContainer("pocketmine.command.timings.timingsRead",
["https://" . $this->host . "/?id=" . $response["id"]]));
}else{
Expand Down

0 comments on commit 409c8c1

Please sign in to comment.