summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvasike2013-08-14 14:38:38 (GMT)
committer Bojan Zivanovic2013-08-14 14:38:38 (GMT)
commite42737e2e526f055836afe51f41698aeb2bb4473 (patch)
treeea48e31f01cc42aa1bf1e49a7c735a9c6088efb3
parent9b1508320868284677e66dc062f96ad67bb68ccf (diff)
Issue #2065131 by vasike: Fixed Notice error on Generate products with Commerce Devel Generate.
-rw-r--r--commerce_file.module2
1 files changed, 1 insertions, 1 deletions
diff --git a/commerce_file.module b/commerce_file.module
index 476a8c5..93617c8 100644
--- a/commerce_file.module
+++ b/commerce_file.module
@@ -514,7 +514,7 @@ function commerce_file_exit($destination = NULL) {
function commerce_file_commerce_license_types_list_alter(&$types, $product) {
$product_types = variable_get('commerce_file_product_types', array());
$product_types = array_filter($product_types);
- if (!in_array($product->type, $product_types)) {
+ if (!empty($product) && !in_array($product->type, $product_types)) {
unset($types['file']);
}
}