summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@owncloud.com>2013-08-07 17:01:14 +0200
committerAndreas Fischer <bantu@owncloud.com>2013-08-07 17:01:14 +0200
commit67df0a60fba81af8e8783759cd09258ba78fc085 (patch)
treeb75418c187eb272ffa2cebe42e626fd38455fd2a
parent3534c3b3735242afa5c991417027a8c8e41e6465 (diff)
downloadnextcloud-server-67df0a60fba81af8e8783759cd09258ba78fc085.tar.gz
nextcloud-server-67df0a60fba81af8e8783759cd09258ba78fc085.zip
Check expected type after JSON decode instead of checking what is not expected.
This will also allow "true" and "false" as filenames instead of only "null".
-rw-r--r--apps/files/ajax/download.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files/ajax/download.php b/apps/files/ajax/download.php
index 7c8dcb372e2..b2bfd53506d 100644
--- a/apps/files/ajax/download.php
+++ b/apps/files/ajax/download.php
@@ -35,7 +35,7 @@ $dir = $_GET["dir"];
$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);
}