]> 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)
committerMorris Jobke <hey@morrisjobke.de>
Mon, 12 Oct 2020 20:17:06 +0000 (22:17 +0200)
commit02fa3253fe82673e14b03e78b4e30a61d8982c19
tree362101da75170abc9ab8b6e9aa898a213ef60009
parentdeb499d34e7e4760db22d250b4cb1449e981d98c
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