From 6cbabdf217f55df3655143aa82b6e5e74650df05 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 13 Oct 2014 12:54:21 +0200 Subject: [PATCH] Fixed array detection on public download When downloading a folder called "0001" PHP should fallback to parsing it as string and properly detect that it is not a JSON array. --- apps/files_sharing/public.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 5c75168d9a9..4320c105103 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -114,7 +114,7 @@ if (isset($path)) { $files = $_GET['files']; $files_list = json_decode($files); // in case we get only a single file - if ($files_list === NULL ) { + if (!is_array($files_list)) { $files_list = array($files); } OC_Files::get($path, $files_list, $_SERVER['REQUEST_METHOD'] == 'HEAD'); -- 2.39.5