From 638be96232e8e35345509ba6f6a83905a312a57a Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Mon, 30 Oct 2017 21:06:35 +0100 Subject: [PATCH] Do not error when downloading from a numeric public subfolder Fixes #6820 Signed-off-by: Roeland Jago Douma --- apps/files_sharing/lib/Controller/ShareController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php index ed9ad33417..700ac22080 100644 --- a/apps/files_sharing/lib/Controller/ShareController.php +++ b/apps/files_sharing/lib/Controller/ShareController.php @@ -458,6 +458,10 @@ class ShareController extends Controller { if ($files_list === null) { $files_list = [$files]; } + // Just in case $files is a single int like '1234' + if (!is_array($files_list)) { + $files_list = [$files_list]; + } } $userFolder = $this->rootFolder->getUserFolder($share->getShareOwner());