Catch .info file syntax error
| Project: | Coder |
| Version: | 6.x-1.0 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
I just found out when .info has syntax error, the core module system can still install the problem module and show no error. However, this cause problem with "Update status". For example, I made a mistake like this in my .info:
name = My Module Name
description = this string do not parse "because it has quote" in the middleEventhough the second line is bad, somehow module can still install. But when this .info file is checked in to contributes repo, new release version get out-of-date warning in Update status, and recommend using the previous version. I believe the problem is error in parsing the second line so the rest of the .info lines gets ignore and there is no datastamp to compare.
So it would be nice if Coder can test .info for syntax error as part of code review by running parse_ini_file() on .info file and check for 'false' return.

#1
Nevermind the bit about using parse_ini_file(). I found out the info files are parsed with this:
drupal_parse_info_file()