TimingsCommand: workaround a PHPStan type specifying bug

This commit is contained in:
Dylan K. Taylor 2020-06-10 12:11:10 +01:00
parent 376926c700
commit 409c8c1703

View File

@ -161,7 +161,8 @@ class TimingsCommand extends VanillaCommand{
$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{