Modules without files[] in .info cause errors
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | base system |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Dave Reid |
| Status: | closed |
If you have a contrib module for 7.x that doesn't provide the files[] array in it's .info file, and you enable that module, it causes errors in _registry_rebuild:
* notice: Undefined index: files in /Applications/MAMP/htdocs/core/includes/registry.inc on line 47.
* warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/core/includes/registry.inc on line 47.
* notice: Undefined index: files in /Applications/MAMP/htdocs/core/includes/registry.inc on line 47.
* warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/core/includes/registry.inc on line 47.
Patch adds a default $info['files'] = array() to module_rebuild_cache. Patch will also mark the module as incompatible in admin/build/modules so the rouge module cannot be enabled, since it would never be useful as no module functions would be found in the registry.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| module-info-files-D7.patch | 1.42 KB | Idle | Failed: Failed to apply patch. | View details | Re-test |

#1
Nice. This removes some rather disconcerting error messages.
#2
Yay! Thanks. :)
#3
Follow-up patch that does the same check when everyone will be upgrading to D7 from D6!
#4
Had a logic error.
#5
Macintosh-105:core webchick$ patch -p0 < module-info-files-followup-D7_0.patch
patching file update.php
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 512 with fuzz 1 (offset 1 line).
Could you give this a quick re-roll? I just stumbled across it again and it seems like a good idea. :) And now that it's actually possible to upgrade D6 => D7 we can even test it too. ;)
#6
Reroll
#7
The last submitted patch failed testing.
#8
Re-roll with matching parathesis.
#9
The last submitted patch failed testing.
#10
Failed due to #74645: modify file_scan_directory to include a regex for the nomask.. Setting back to code needs review.
#11
Trivial patch, RTBC.
#12
Committed; thanks! :)
#13
Automatically closed -- issue fixed for two weeks with no activity.