fix error

This commit is contained in:
flash 2023-10-13 19:35:06 +00:00
parent e2454e1002
commit 5a82b9258c

View file

@ -20,9 +20,11 @@ final class AssetsInfo {
} }
public static function fromFile(string $path): self { public static function fromFile(string $path): self {
try {
$body = file_get_contents($path); $body = file_get_contents($path);
if($body === false) } catch(\ErrorException $ex) {
return new static([]); return new static([]);
}
return self::fromJson($body); return self::fromJson($body);
} }