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: v5.0.10~6 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=604ba1d0f71e81c3d10c8287df6ad22f1a94f1a7;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); }