]> source.dussan.org Git - nextcloud-server.git/commitdiff
Check expected type after JSON decode instead of checking what is not expected.
authorAndreas Fischer <bantu@owncloud.com>
Wed, 7 Aug 2013 15:01:14 +0000 (17:01 +0200)
committerAndreas Fischer <bantu@owncloud.com>
Wed, 7 Aug 2013 15:01:14 +0000 (17:01 +0200)
This will also allow "true" and "false" as filenames instead of only "null".

apps/files/ajax/download.php

index 7c8dcb372e24c5d4517b1ac5459e1c03feb9744a..b2bfd53506d66697482f645e1f40cb6e5bff298d 100644 (file)
@@ -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);
 }