Function filemtime() throw errors when the system found a module file without info file.
The system is use the "name", but it does not check is it exists in the info or provide default value for "name".

How to reproduce:

  1. Create a *.module file somewhere, without *.info.
  2. Go to /admin/modules

Related issue: #1793074: Convert .info files to YAML

CommentFileSizeAuthor
#1 drupal-1850006.patch1.76 KBsweetchuck

Comments

sweetchuck’s picture

Status: Active » Needs review
StatusFileSize
new1.76 KB

Quick fix.

mahtoranjeet’s picture

Status: Needs review » Reviewed & tested by the community
  1. Downloaded and Install New Drupal 8
  2. Created a Module myodule with a file mymodule.module and having no mymodule.info file
  3. Now Go to admin/modules
  4. I got the warming message "Warning: filemtime(): stat failed for modules/mymodule/mymodule.info in _system_rebuild_module_data() (line 2770 ofcore/modules/system/system.module)."
  5. After that I downloaded above(#1) patch and apply it
  6. Now "Warming:filetime()" message is not coming
aspilicious’s picture

Status: Reviewed & tested by the community » Needs review

Why would you silently ignore broken modules. It's better to throw some errors in your face so you know those modules are plain broken. No?

marcingy’s picture

This is won't fix in my eyes, or at least in the way proposed here, as modules should always have info files it is a requirement

marcingy’s picture

Status: Needs review » Needs work
mahtoranjeet’s picture

I agree. Module should alway have a info file. Without info file module will not list on /admin/modules page. If info file does not exits in module then an error message should show.

sweetchuck’s picture

I ran into this issue when I was would like to use the coder module.
Does not belong info file to the following modules:
.../coder/coder_upgrade/tests/old/samples/example.module
.../coder/coder_upgrade/tests/new/samples/example.module

marcingy’s picture

Project: Drupal core » Coder
Version: 8.x-dev » 7.x-2.x-dev
Component: base system » Code

So it is an issue with coder.

klausi’s picture

Issue summary: View changes
Status: Needs work » Closed (won't fix)

Coder 7.x is frozen now and will not receive updates. Coder 8.x-2.x can be used to check code for any Drupal version, Coder 8.x-2.x also supports the phpcbf command to automatically fix conding standard errors. Please check if this issue is still relevant and reopen against that version if necessary.