mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 22:45:28 +00:00
ZippedResourcePack: fix mishandling of wrong root JSON type (crashdump #2840512)
This commit is contained in:
parent
d724374d1a
commit
70b1ac856d
@ -104,7 +104,9 @@ class ZippedResourcePack implements ResourcePack{
|
||||
}catch(\RuntimeException $e){
|
||||
throw new ResourcePackException("Failed to parse manifest.json: " . $e->getMessage(), $e->getCode(), $e);
|
||||
}
|
||||
|
||||
if(!($manifest instanceof \stdClass)){
|
||||
throw new ResourcePackException("manifest.json should contain a JSON object, not " . gettype($manifest));
|
||||
}
|
||||
if(!self::verifyManifest($manifest)){
|
||||
throw new ResourcePackException("manifest.json is missing required fields");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user