mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 09:19:42 +00:00
TimingsCommand: fixed crash on result handling
since AsyncTask->getResult() returns mixed, phpstan has no idea what is being returned here, so it doesn't report any errors.
This commit is contained in:
parent
e11dbf03e2
commit
46c57e4e24
@ -163,7 +163,7 @@ class TimingsCommand extends VanillaCommand{
|
|||||||
$sender->getServer()->getLogger()->logException($result);
|
$sender->getServer()->getLogger()->logException($result);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$response = json_decode($result[0], true);
|
$response = json_decode($result->getBody(), true);
|
||||||
if(is_array($response) && isset($response["id"])){
|
if(is_array($response) && isset($response["id"])){
|
||||||
Command::broadcastCommandMessage($sender, new TranslationContainer("pocketmine.command.timings.timingsRead",
|
Command::broadcastCommandMessage($sender, new TranslationContainer("pocketmine.command.timings.timingsRead",
|
||||||
["https://" . $this->host . "/?id=" . $response["id"]]));
|
["https://" . $this->host . "/?id=" . $response["id"]]));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user