Got this while installing Fasttoggle 7.x-1.5 into Drupal 7.30 on PHP 5.3:
PHP Parse error: parse error, expecting `']'' in /Library/WebServer/Documents/sites/all/modules/fasttoggle/module/fasttoggle_field/fasttoggle_field.module on line 141
The line in question reads thus:
$temp = $temp[array_keys($temp)[0]];
Indexing a returned array on the fly is not allowed in PHP 5.3, it needs to be put in another temp variable first:
$temp = field_default_view($entity_type, $entity, $field, $instance, $langcode, $items, $display);
if ($temp) {
$foo = array_keys($temp);
$temp = $temp[$foo[0]];
$temp['#label_display'] = "hidden";
$element[] = $temp;
}
Comments
Comment #1
nigelcunningham commentedThanks for pointing this out.
Fix pushed to dev and will be in the next release.