From 949782b4b3ab97d0c12ebd193fb5a1c0ad1954a3 Mon Sep 17 00:00:00 2001 From: Helior Colorado Date: Fri, 27 Apr 2012 11:42:00 -0700 Subject: [PATCH] Setting default item properties in price field formatter view --- modules/price/commerce_price.module | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/modules/price/commerce_price.module b/modules/price/commerce_price.module index 786f71d..f2ce454 100644 --- a/modules/price/commerce_price.module +++ b/modules/price/commerce_price.module @@ -401,6 +401,13 @@ function commerce_price_field_formatter_view($entity_type, $entity, $field, $ins continue; } + // Ensure the basic item array properties are set. + $item += array( + 'currency_code' => NULL, + 'data' => array(), + ); + $item['data'] += array('components' => array()); + // Theme the display of the price based on the display type. switch ($display['type']) { case 'commerce_price_raw_amount': -- 1.7.6