From: Olivier Tétard Date: Tue, 12 Mar 2013 10:53:41 +0000 (+0100) Subject: Fix file sharing via public link for one particular file. X-Git-Tag: v5.0.1~48^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2afece459a192065a21665a0dbe0d0ba96a96ef1;p=nextcloud-server.git Fix file sharing via public link for one particular file. Fix OC_Files::get() to not return the first character of the filename if only one file is requested. --- diff --git a/lib/files.php b/lib/files.php index 2433502444c..04ba51d9d24 100644 --- a/lib/files.php +++ b/lib/files.php @@ -50,7 +50,7 @@ class OC_Files { $xsendfile = true; } - if (count($files) == 1) { + if (is_array($files) && count($files) == 1) { $files = $files[0]; }