mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +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:
parent
ddbc5cf960
commit
3c4dca7fdb
@ -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");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user