Skip to content

Commit 79dc43a

Browse files
committed
Fix undefined extension array key error in SnapshotRepository::getAll()
1 parent 99d12c7 commit 79dc43a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/SnapshotRepository.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ public function getAll(): Collection
1919
->filter(function (string $fileName) {
2020
$pathinfo = pathinfo($fileName);
2121

22-
if ($pathinfo['extension'] === 'gz') {
22+
if (
23+
array_key_exists('extension', $pathinfo)
24+
&& $pathinfo['extension'] === 'gz'
25+
) {
2326
$fileName = $pathinfo['filename'];
2427
}
2528

0 commit comments

Comments
 (0)