]> source.dussan.org Git - nextcloud-server.git/commit
Fix undefined index and consequential damages in versions code
authorChristoph Wurst <christoph@winzerhof-wurst.at>
Thu, 8 Oct 2020 17:52:29 +0000 (19:52 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Tue, 13 Oct 2020 15:39:32 +0000 (15:39 +0000)
commit8a25ded7585871ce579d6439baf58c5cd0f6812b
treefcc1e6c9f918c24e13fdcda279d13730ae264755
parent4af8bf2468b10080ad21e8d657d6a595eaab086f
Fix undefined index and consequential damages in versions code

If the user has no space and there are no versions, there won't be an
`all` index in the versions entry. Hence this triggers a warning and
becomes `null`, afterwards `count`, `foreach` and friends will happily
throw even more warnings and errors because they don't want to play with
`null`. Thus adding a fallback to an empty array.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
apps/files_versions/lib/Storage.php