mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
Merge branch 'stable' into next-minor
This commit is contained in:
@ -132,6 +132,7 @@ use function get_class;
|
||||
use function ini_set;
|
||||
use function is_array;
|
||||
use function is_dir;
|
||||
use function is_object;
|
||||
use function is_resource;
|
||||
use function is_string;
|
||||
use function json_decode;
|
||||
@ -1617,7 +1618,7 @@ class Server{
|
||||
"reportPaste" => base64_encode($dump->getEncodedData())
|
||||
], 10, [], $postUrlError);
|
||||
|
||||
if($reply !== null && ($data = json_decode($reply->getBody())) !== null){
|
||||
if($reply !== null && is_object($data = json_decode($reply->getBody()))){
|
||||
if(isset($data->crashId) && isset($data->crashUrl)){
|
||||
$reportId = $data->crashId;
|
||||
$reportUrl = $data->crashUrl;
|
||||
|
@ -125,6 +125,7 @@ use function get_class;
|
||||
use function in_array;
|
||||
use function json_encode;
|
||||
use function ksort;
|
||||
use function strcasecmp;
|
||||
use function strlen;
|
||||
use function strtolower;
|
||||
use function substr;
|
||||
@ -635,7 +636,7 @@ class NetworkSession{
|
||||
continue;
|
||||
}
|
||||
$info = $existingSession->getPlayerInfo();
|
||||
if($info !== null && ($info->getUsername() === $this->info->getUsername() || $info->getUuid()->equals($this->info->getUuid()))){
|
||||
if($info !== null && (strcasecmp($info->getUsername(), $this->info->getUsername()) === 0 || $info->getUuid()->equals($this->info->getUuid()))){
|
||||
if($kickForXUIDMismatch($info instanceof XboxLivePlayerInfo ? $info->getXuid() : "")){
|
||||
return;
|
||||
}
|
||||
|
@ -64,6 +64,13 @@ class ZippedResourcePack implements ResourcePack{
|
||||
if(!file_exists($zipPath)){
|
||||
throw new ResourcePackException("File not found");
|
||||
}
|
||||
$size = filesize($zipPath);
|
||||
if($size === false){
|
||||
throw new ResourcePackException("Unable to determine size of file");
|
||||
}
|
||||
if($size === 0){
|
||||
throw new ResourcePackException("Empty file, probably corrupted");
|
||||
}
|
||||
|
||||
$archive = new \ZipArchive();
|
||||
if(($openResult = $archive->open($zipPath)) !== true){
|
||||
|
Reference in New Issue
Block a user