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".
remotes/origin/stable6
Andreas Fischer 12 years ago
parent 3534c3b373
commit 67df0a60fb
  1. 2
      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);
}

Loading…
Cancel
Save