Merge branch 'stable'

# Conflicts:
#	resources/vanilla
#	src/network/mcpe/convert/LegacySkinAdapter.php
#	tests/phpstan/configs/check-explicit-mixed-baseline.neon
#	tests/phpstan/configs/phpstan-bugs.neon
This commit is contained in:
Dylan K. Taylor 2020-06-19 10:48:27 +01:00
commit 64e9647334
3 changed files with 2 additions and 12 deletions

View File

@ -25,9 +25,9 @@ namespace pocketmine\network\mcpe\convert;
use pocketmine\entity\InvalidSkinException;
use pocketmine\entity\Skin;
use pocketmine\network\mcpe\protocol\types\SkinData;
use pocketmine\network\mcpe\protocol\types\SkinImage;
use function is_array;
use function is_string;
use function json_decode;
use function json_encode;
@ -60,7 +60,7 @@ class LegacySkinAdapter implements SkinAdapter{
$capeData = $data->isPersonaCapeOnClassic() ? "" : $data->getCapeImage()->getData();
$resourcePatch = json_decode($data->getResourcePatch(), true);
if(isset($resourcePatch["geometry"]["default"]) && is_string($resourcePatch["geometry"]["default"])){
if(is_array($resourcePatch) && isset($resourcePatch["geometry"]["default"]) && is_string($resourcePatch["geometry"]["default"])){
$geometryName = $resourcePatch["geometry"]["default"];
}else{
throw new InvalidSkinException("Missing geometry name field");

View File

@ -145,11 +145,6 @@ parameters:
count: 1
path: ../../../src/network/mcpe/compression/CompressBatchTask.php
-
message: "#^Cannot access offset 'geometry' on mixed\\.$#"
count: 3
path: ../../../src/network/mcpe/convert/LegacySkinAdapter.php
-
message: "#^Method pocketmine\\\\network\\\\mcpe\\\\raklib\\\\PthreadsChannelReader\\:\\:read\\(\\) should return string\\|null but returns mixed\\.$#"
count: 1

View File

@ -55,11 +55,6 @@ parameters:
count: 1
path: ../../../src/network/mcpe/compression/ZlibCompressor.php
-
message: "#^Strict comparison using \\=\\=\\= between array and false will always evaluate to false\\.$#"
count: 1
path: ../../../src/utils/Timezone.php
-
message: "#^Strict comparison using \\=\\=\\= between string and false will always evaluate to false\\.$#"
count: 1