Skip to content

Commit

Permalink
Fix undefined extension array key error in `SnapshotRepository::get…
Browse files Browse the repository at this point in the history
…All()`
  • Loading branch information
eli-s-r committed Jun 17, 2022
1 parent 99d12c7 commit 79dc43a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/SnapshotRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ public function getAll(): Collection
->filter(function (string $fileName) {
$pathinfo = pathinfo($fileName);

if ($pathinfo['extension'] === 'gz') {
if (
array_key_exists('extension', $pathinfo)
&& $pathinfo['extension'] === 'gz'
) {
$fileName = $pathinfo['filename'];
}

Expand Down

0 comments on commit 79dc43a

Please sign in to comment.