Recently when moving a site from a PHP4 environment to a PHP5 environment, I discovered that a string containing "::" in the value of a template .info file will crash Drupal with the following error message:
"Fatal error: Class '' not found in [PATH_TO_DRUPAL]/includes/common.inc on line 3551"
Examples (can be added to any installed template .info file):
settings[crashme] = ::
settings[crashme] = "::"
settings[crashme] = "\:\:"
settings[crashme] = '::'
settings[crashme] = '\:\:'
settings[crashme] = "Foo::Bar"
The last one will result in the error:
"Fatal error: Class 'Foo' not found in [PATH_TO_DRUPAL]/includes/common.inc on line 3551"
Now, escaping each colon and adding a semi-colon to the end of the line will fix the problem. The following lines will NOT result in an error message or crash:
settings[crashme] = "\:\:";
settings[crashme] = '\:\:';
Comments
Comment #1
mr.baileysDuplicate of #424372: :: in .info files causes Fatal error