mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
Merge pull request #20578 from nextcloud/backport/20449/stable18
[stable18] Array offset error due to empty file versions array
This commit is contained in:
commit
ddd7a8dba5
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