]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fixed array detection on public download
authorVincent Petry <pvince81@owncloud.com>
Mon, 13 Oct 2014 10:54:21 +0000 (12:54 +0200)
committerVincent Petry <pvince81@owncloud.com>
Mon, 13 Oct 2014 10:54:21 +0000 (12:54 +0200)
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

index 5c75168d9a9854c38b0db7146834818b337a0c96..4320c105103c48662acf1da234bb1e0821127d19 100644 (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');