From 372676ee17c085286e00ed011af7a2de74c83e55 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 13 Oct 2014 12:54:21 +0200 Subject: 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. Backport of 6cbabdf217f55df3655143aa82b6e5e74650df05 from master --- apps/files_sharing/public.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/files_sharing') diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 29cb35b2c6c..ea84400f103 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -108,7 +108,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'); -- cgit v1.2.3