imagepicker_file_download (hook_file_download) returns null if its not needed by this module.

This must not return anything other wise it breaks every private file on the website when using "Private local files served by Drupal."

CommentFileSizeAuthor
image-picker-hook_file_download.patch249 bytesMike Dodd
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Mike Dodd’s picture

Status: Fixed » Needs review
Mike Dodd’s picture

Status: Needs review » Patch (to be ported)

hutch’s picture

Oh dear, more bad docs, in Drupal API docs

Return value

If the user does not have permission to access the file, return -1. If the user has permission, return an array with the appropriate headers. If the file is not controlled by the current module, the return value should be NULL.

However the examples return nothing so I have commited your patch.
Thank you for reporting this.

hutch’s picture

Version: 7.x-1.8 » 7.x-1.x-dev
Status: Patch (to be ported) » Needs review