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:
Dylan K. Taylor 2025-01-08 01:48:55 +00:00
parent 5e0f03dff0
commit d42ec06647
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -100,7 +100,7 @@ class ZippedResourcePack implements ResourcePack{
try{
$manifest = (new CommentedJsonDecoder())->decode($manifestData);
}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)){
throw new ResourcePackException("manifest.json should contain a JSON object, not " . gettype($manifest));