mirror of
https://github.com/nextcloud/server.git
synced 2026-04-24 15:53:36 -04:00
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:
parent
2cf8fab366
commit
d2dae7ccf6
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue