以下技术应用于最优质的水果的鲜果篮
Notice: String offset cast occured in _field_invoke_multiple() (line 321 of /home/opojisteni/public_html/modules/field/field.attach.inc).
解决:
theme_inline_entity_form_entity_table.2036607.d7.patch:
diff --git a/inline_entity_form.module b/inline_entity_form.module
index be41f13..f270aad 100644
--- a/inline_entity_form.module
+++ b/inline_entity_form.module
@@ -1355,6 +1355,14 @@ function theme_inline_entity_form_entity_table($variables) {
$rows = array();
foreach (element_children($form) as $key) {
$entity = $form[$key]['#entity'];
+
+ // Workaround for core bug #1824820
+ // entity_extract_ids returns null when entity does not exist and _field_invoke_multiple tries to
+ // check options for null key index for language that throws a notice.
+ $info = entity_get_info($entity_type);
+ $entity->{$info['entity keys']['id']} = 0;
+ $entity->language = array(0 => $entity->language);
+
list($entity_id) = entity_extract_ids($entity_type, $entity);
// Many field formatters (such as the ones for files and images) need
// certain data that might be missing on unsaved entities because the field