Fix #19066 - Array offset error due to empty file versions array

Signed-off-by: Liam JACK <liamjack@users.noreply.github.com>
This commit is contained in:
Liam JACK 2020-04-12 15:35:17 +02:00 committed by backportbot[bot]
parent 2cf8fab366
commit d2dae7ccf6

View file

@ -649,6 +649,11 @@ class Storage {
}
$firstVersion = reset($versions);
if ($firstVersion === false) {
return [$toDelete, $size];
}
$firstKey = key($versions);
$prevTimestamp = $firstVersion['version'];
$nextVersion = $firstVersion['version'] - $step;