]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix file sharing via public link for one particular file.
authorOlivier Tétard <olivier.tetard@miskin.fr>
Tue, 12 Mar 2013 10:53:41 +0000 (11:53 +0100)
committerThomas Mueller <thomas.mueller@tmit.eu>
Tue, 12 Mar 2013 19:03:54 +0000 (20:03 +0100)
Fix OC_Files::get() to not return the first character of the filename
if only one file is requested.

lib/files.php

index 2433502444cfb4ed43908122f73f5badb13ec0f6..04ba51d9d2404727a1c29f1bd287bcdb64ea8479 100644 (file)
@@ -50,7 +50,7 @@ class OC_Files {
                        $xsendfile = true;
                }
 
-               if (count($files) == 1) {
+               if (is_array($files) && count($files) == 1) {
                        $files = $files[0];
                }