mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 09:19:42 +00:00
Fix server crashing while crashing when trying to decode an invalid response from the crash-archive post
This commit is contained in:
parent
e0f8a02bb8
commit
1bae973502
@ -2157,7 +2157,7 @@ class Server{
|
|||||||
"reportPaste" => base64_encode($dump->getEncodedData())
|
"reportPaste" => base64_encode($dump->getEncodedData())
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if(($data = json_decode($reply)) !== false and isset($data->crashId)){
|
if($reply !== false and ($data = json_decode($reply)) !== null and isset($data->crashId) and isset($data->crashUrl)){
|
||||||
$reportId = $data->crashId;
|
$reportId = $data->crashId;
|
||||||
$reportUrl = $data->crashUrl;
|
$reportUrl = $data->crashUrl;
|
||||||
$this->logger->emergency($this->getLanguage()->translateString("pocketmine.crash.archive", [$reportUrl, $reportId]));
|
$this->logger->emergency($this->getLanguage()->translateString("pocketmine.crash.archive", [$reportUrl, $reportId]));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user