diff --git a/commerce_file.module b/commerce_file.module index 476a8c57ab42f520b245067cc77089c4e6a00277..93617c865f99eb35bf740614b275efd9c1dc087b 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']); } }