When updating field_collection from 1.0b8 to 1.0b9 with drush, the update fails:
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: syntax error, unexpected T_FUNCTION in
/home/jrdev/public_html/sites/all/modules/field_collection/field_collection.module, line 591
Parse error: syntax error, unexpected T_FUNCTION in /home/jrdev/public_html/sites/all/modules/field_collection/field_collection.module on line 591The external command could not be executed due to an application error. [error]
Backups were restored successfully.
Inspecting the file in question, looks as if line 591 contains a missing ")" for array_filter:
$all_boolean = $instances && !(bool) array_filter($instances, function ($instance) {
should be
$all_boolean = $instances && !(bool) array_filter($instances, function ($instance)) { .
Patch attached.
Comments
Comment #2
mef613 commentedPatch attached.
Comment #4
sagar ramgade commentedIt seems you are using php 5.2 or lower which doesn't support closures (http://culttt.com/2013/03/25/what-are-php-lambdas-and-closures/), I think it is better to mention php = 5.3 in .info file.
Comment #5
sagar ramgade commentedComment #6
tobiasb