Active
Project:
IMCE Private Files
Version:
7.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Oct 2015 at 19:08 UTC
Updated:
15 Dec 2016 at 15:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
ldpm commentedThanks. What version of Drupal are you running? Any specific steps to reproduce the problem?
Comment #3
hayzer commentedOn 7.39.
The error appears when the module is enabled and I try to access a link. Disabling the module causes the error to go away.
Happy to try something more extensive if you like. I'm trying to get an intranet site up currently, so I'm testing serving of private files.
Comment #4
robbmlewis commentedI just ran into the same error, 7.53. I uploaded a file to the server for the theme banner. File in banner field was set to "public://web/banner2.png" and I couldn't get the banner to display. There was a managed file for this in the database, but it was for the temporary location during upload (Temporary://banner2.png). Tried to view the image directly (/system/files/web/banner2.png) and I got the error:
Recoverable fatal error: Argument 1 passed to file_usage_list() must be an instance of stdClass, boolean given, called in /home/thetroth/d7devel.thetroth.org/sites/all/modules/imce_private_files/imce_private_files.module on line 176 and defined in file_usage_list() (line 648 of /home/thetroth/d7devel.thetroth.org/includes/file.inc).
I disabled the module and it displayed correctly.
Comment #5
robbmlewis commentedThe issue looks to be file_load_multiple() comes back with 0 files, so it fails when using file_usage_list(). The patch checks to make sure that there are results, and if not return FALSE. Returning TRUE gives an access denied error.
Comment #6
ldpm commentedThanks, I'll get that committed soon.