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.
This commit is contained in:
Vincent Petry 2014-10-13 12:54:21 +02:00
parent 4b9465b937
commit 6cbabdf217
1 changed files with 1 additions and 1 deletions

View File

@ -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');