file_admin_form_file_entity_admin_file_alter() throws a fatal error if there are no "files" in admin/content/file, as it passes an empty value to the SQL query.

Comments

reubenavery’s picture

Status: Active » Needs review
StatusFileSize
new1.31 KB

Here's a patch fixing that.

nicolasg’s picture

This patch fixes one error but breaks something else...when viewing the list you then get a "published" is undefined because your manipulating the copied array and not the original array in the for loop.
Yes its only a notice warning, but if you have php5.3 with notice errors set to show its a problem.

Simply change
foreach ($fids as $fid => &$option) {
to
foreach ($form['admin']['files']['#options'] as $fid => &$option) {
in his patch.

deviantintegral’s picture

Issue summary: View changes
StatusFileSize
new1.34 KB

Here's a patch incorporating the change from #2.

nedjo’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.