mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-04 00:55:14 +00:00
ZippedResourcePack: Handle json decoding errors correctly
Previously this would crash if it failed to decode the JSON (https://forums.pmmp.io/threads/texture-pack-shows-errors-not-working.4880/)
This commit is contained in:
@ -86,7 +86,7 @@ class ZippedResourcePack implements ResourcePack{
|
||||
$archive->close();
|
||||
|
||||
$manifest = json_decode($manifestData);
|
||||
if(!self::verifyManifest($manifest)){
|
||||
if($manifest === null or !self::verifyManifest($manifest)){
|
||||
throw new \InvalidStateException("Could not load resource pack from $zipPath: manifest.json is invalid or incomplete");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user