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.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | file_admin-no_files_fix-2097937-3.patch | 1.34 KB | deviantintegral |
| #1 | file_admin-no_files_fix-2097937-1.patch | 1.31 KB | reubenavery |
Comments
Comment #1
reubenavery commentedHere's a patch fixing that.
Comment #2
nicolasg commentedThis 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.
Comment #3
deviantintegral commentedHere's a patch incorporating the change from #2.
Comment #4
nedjoThanks all! Fixed in http://drupalcode.org/project/file_admin.git/commit/d2fcdb0.