diff --git a/content.module b/content.module index ea510c9..dd1b5ae 100644 --- a/content.module +++ b/content.module @@ -2430,7 +2430,7 @@ function template_preprocess_content_field(&$variables) { foreach (element_children($element['items']) as $delta) { $variables['items'][$delta] = $element['items'][$delta]['#item']; } - $variables['items'][0]['view'] = $element['items']['#children']; + $variables['items'][0]['view'] = isset($element['items']['#children']) ? $element['items']['#children'] : NULL; } $variables['teaser'] = $element['#teaser']; @@ -2733,7 +2733,7 @@ function content_inactive_fields($type_name = NULL) { /** * Helper function to identify inactive instances. * This will be the same results as content_inactive_fields(), - * EXCEPT that his function will return inactive instances even + * EXCEPT that his function will return inactive instances even * if the fields have other (shared) instances that are still active. */ function content_inactive_instances($type_name = NULL) { @@ -2762,21 +2762,21 @@ function content_inactive_instances($type_name = NULL) { * for a field by name, no matter how deeply nested it is within * fieldgroups or multigroups, or to find the multiple value * sub-elements within a field element by name (i.e. 'value' or - * 'nid'). You can also use this function to see if an item exists + * 'nid'). You can also use this function to see if an item exists * in a form (the return will be an empty array if it does not exist). * - * A field/group will generally only exist once in a form but the - * function can also be used to locate all the 'value' elements + * A field/group will generally only exist once in a form but the + * function can also be used to locate all the 'value' elements * within a multiple value field if you pass the multiple value field * as the $form argument; * - * For example, for a field named field_custom, the following will - * pluck out the form element for this field from the node form, + * For example, for a field named field_custom, the following will + * pluck out the form element for this field from the node form, * no matter how deeply it is nested within fieldgroups or fieldsets: * * $element = array_shift(content_get_nested_elements($node_form, 'field_custom')); * - * You can prefix the function with '&' to retrieve the element by + * You can prefix the function with '&' to retrieve the element by * reference to alter it directly: * * $elements = &content_get_nested_elements($form, 'field_custom');