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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

Nice. This removes some rather disconcerting error messages.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Yay! Thanks. :)

Dave Reid’s picture

Status: Fixed » Needs review
FileSize
708 bytes

Follow-up patch that does the same check when everyone will be upgrading to D7 from D6!

Dave Reid’s picture

Had a logic error.

webchick’s picture

Status: Needs review » Needs work

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. ;)

swentel’s picture

Status: Needs work » Needs review
FileSize
935 bytes

Reroll

Anonymous’s picture

Status: Needs review » Needs work

The last submitted patch failed testing.

Dave Reid’s picture

Status: Needs work » Needs review
FileSize
687 bytes

Re-roll with matching parathesis.

Status: Needs review » Needs work

The last submitted patch failed testing.

Dave Reid’s picture

Status: Needs work » Needs review

Failed due to #74645: modify file_scan_directory to include a regex for the nomask.. Setting back to code needs review.

catch’s picture

Status: Needs review » Reviewed & tested by the community

Trivial patch, RTBC.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed; thanks! :)

Status: Fixed » Closed (fixed)

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