mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 01:51:51 +00:00
ZippedResourcePack: don't pass exception code to new exception
this is a BUT (int|string) under PHPStan, and we don't need the errors. We don't care about this code anyway.
This commit is contained in:
parent
5e0f03dff0
commit
d42ec06647
@ -100,7 +100,7 @@ class ZippedResourcePack implements ResourcePack{
|
|||||||
try{
|
try{
|
||||||
$manifest = (new CommentedJsonDecoder())->decode($manifestData);
|
$manifest = (new CommentedJsonDecoder())->decode($manifestData);
|
||||||
}catch(\RuntimeException $e){
|
}catch(\RuntimeException $e){
|
||||||
throw new ResourcePackException("Failed to parse manifest.json: " . $e->getMessage(), $e->getCode(), $e);
|
throw new ResourcePackException("Failed to parse manifest.json: " . $e->getMessage(), 0, $e);
|
||||||
}
|
}
|
||||||
if(!($manifest instanceof \stdClass)){
|
if(!($manifest instanceof \stdClass)){
|
||||||
throw new ResourcePackException("manifest.json should contain a JSON object, not " . gettype($manifest));
|
throw new ResourcePackException("manifest.json should contain a JSON object, not " . gettype($manifest));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user