Download & Extend

Modules without files[] in .info cause errors

Project:Drupal core
Version:7.x-dev
Component:base system
Category:bug report
Priority:normal
Assigned:Dave Reid
Status:closed (fixed)

Issue Summary

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.

AttachmentSizeStatusTest resultOperations
module-info-files-D7.patch1.42 KBIdleFailed: Failed to apply patch.View details

Comments

#1

Status:needs review» reviewed & tested by the community

Nice. This removes some rather disconcerting error messages.

#2

Status:reviewed & tested by the community» fixed

Yay! Thanks. :)

#3

Status:fixed» needs review

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

AttachmentSizeStatusTest resultOperations
module-info-files-followup-D7.patch708 bytesIdleFailed: Failed to install HEAD.View details

#4

Had a logic error.

AttachmentSizeStatusTest resultOperations
module-info-files-followup-D7.patch687 bytesIdleFailed: Failed to install HEAD.View details

#5

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

#6

Status:needs work» needs review

Reroll

AttachmentSizeStatusTest resultOperations
module-info-files-followup-D7.patch935 bytesIdleFailed: Invalid PHP syntax.View details

#7

Status:needs review» needs work

The last submitted patch failed testing.

#8

Status:needs work» needs review

Re-roll with matching parathesis.

AttachmentSizeStatusTest resultOperations
320009-module-info-files-followup-D7.patch687 bytesIdlePassed: 7252 passes, 0 fails, 0 exceptionsView details

#9

Status:needs review» needs work

The last submitted patch failed testing.

#10

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.

#11

Status:needs review» reviewed & tested by the community

Trivial patch, RTBC.

#12

Status:reviewed & tested by the community» fixed

Committed; thanks! :)

#13

Status:fixed» closed (fixed)

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