summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--filefield_field.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/filefield_field.inc b/filefield_field.inc
index ef20306..172856b 100644
--- a/filefield_field.inc
+++ b/filefield_field.inc
@@ -139,6 +139,10 @@ function filefield_field_sanitize($node, $field, &$items, $teaser, $page) {
if (!empty($item['fid']) && empty($item['filepath'])) {
$items[$delta] = array_merge($item, field_file_load($item['fid']));
}
+ // Extract data array from serialized string.
+ if (is_string($item['data'])){
+ $items[$delta]['data'] = unserialize($item['data']);
+ }
// Add nid so formatters can create a link to the node.
$items[$delta]['nid'] = $node->nid;
}