summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbprod2013-03-23 09:58:28 (GMT)
committer Francesco Placella2013-03-23 09:58:28 (GMT)
commit24d410d8144fdd3576bddbf3d28bdecdd1a285c7 (patch)
tree095561a1ed6dcf8e64fe9299667f8722239e0f0e
parent3b41790833f3d231707a97557c050bea0431c257 (diff)
Issue #1850866 by B-Prod: Fixed Undefined index 'format' in title_field_text_with_summary_sync_set().
-rw-r--r--CHANGELOG.txt4
-rw-r--r--title.core.inc8
2 files changed, 8 insertions, 4 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 8d6c325..ee1b7e6 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,7 +1,9 @@
Title 7.x-1.x, xxxx-xx-xx
-------------------------
-Issue #1269076 by plach, das-peter, danielnolde | renat: Fixed Translated
+#1850866 by B-Prod: Fixed Undefined index 'format' in
+ title_field_text_with_summary_sync_set().
+#1269076 by plach, das-peter, danielnolde | renat: Fixed Translated
title_field replaces node->title with translated value.
diff --git a/title.core.inc b/title.core.inc
index 95c9daf..2af63f9 100644
--- a/title.core.inc
+++ b/title.core.inc
@@ -162,9 +162,11 @@ function title_field_text_with_summary_sync_get($entity_type, $entity, $legacy_f
* Sync back callback for the text with summary field type.
*/
function title_field_text_with_summary_sync_set($entity_type, $entity, $legacy_field, $info, $langcode) {
- $format_key = $info['additional keys']['format'];
- $entity->{$info['field']['field_name']}[$langcode][0]['value'] = $entity->{$legacy_field};
- $entity->{$info['field']['field_name']}[$langcode][0]['format'] = $entity->{$format_key};
+ foreach (array('value' => $legacy_field, 'format' => $info['additional keys']['format']) as $column => $name) {
+ if (isset($entity->{$name})) {
+ $entity->{$info['field']['field_name']}[$langcode][0][$column] = $entity->{$name};
+ }
+ }
}
/**