From: Andreas Fischer Date: Wed, 7 Aug 2013 15:01:14 +0000 (+0200) Subject: Check expected type after JSON decode instead of checking what is not expected. X-Git-Tag: v6.0.0alpha2~344^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=67df0a60fba81af8e8783759cd09258ba78fc085;p=nextcloud-server.git 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". --- 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); }