diff --git a/includes/file.inc b/includes/file.inc index 28bfb962929ac88acf661c5f919a5c15b965130c..80fb3f9a3120f8c4e54b38ea183029f8ae9c8833 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -488,12 +488,12 @@ function file_download() { $list = module_list(); foreach ($list as $module) { $headers = module_invoke($module, 'file_download', $file); - if (empty($headers)) { - drupal_access_denied(); - } - elseif (is_array($headers)) { + if (is_array($headers)) { file_transfer($file, $headers); } + elseif ($headers == -1) { + drupal_access_denied(); + } } } drupal_not_found();