summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@owncloud.com>2013-08-07 17:01:14 +0200
committerAndreas Fischer <bantu@owncloud.com>2013-08-08 13:13:55 +0200
commit604ba1d0f71e81c3d10c8287df6ad22f1a94f1a7 (patch)
tree0462a60c4f1c4b9e8962b6a5d8864fa93bd3bc3c /apps
parentcc03251c8f7215de515bf57d4dcba0ffe20af617 (diff)
downloadnextcloud-server-604ba1d0f71e81c3d10c8287df6ad22f1a94f1a7.tar.gz
nextcloud-server-604ba1d0f71e81c3d10c8287df6ad22f1a94f1a7.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".
Diffstat (limited to 'apps')
-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);
}