fix: when retry.json does not exists

This commit is contained in:
Nuno Maduro
2022-12-29 09:37:45 +00:00
parent c9a02b964d
commit b7e2cd758f

View File

@ -60,7 +60,9 @@ final class TempRepository
*/
private function all(): array
{
$contents = file_get_contents(self::FOLDER.'/'.$this->filename.'.json');
$path = self::FOLDER.'/'.$this->filename.'.json';
$contents = file_exists($path) ? file_get_contents($path) : '{}';
assert(is_string($contents));