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.
remotes/origin/fix-10825
Vincent Petry 11 years ago
parent 4b9465b937
commit 6cbabdf217
  1. 2
      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');

Loading…
Cancel
Save