summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBojan Zivanovic2013-07-25 08:46:27 (GMT)
committer Bojan Zivanovic2013-07-25 08:46:27 (GMT)
commitb96ffdea9eaf229a61fb0897b7238fa58cd5aada (patch)
tree84bcbb598f9055fa4cec6d8fa3396c05f33988cc
parent660e04442629353b7d59755b83b2791031f28c28 (diff)
Issue #2049799: Fixed Notice: Undefined index: commerce_license().
-rw-r--r--commerce_file.module2
1 files changed, 1 insertions, 1 deletions
diff --git a/commerce_file.module b/commerce_file.module
index 8f7a98f..953ad2e 100644
--- a/commerce_file.module
+++ b/commerce_file.module
@@ -339,7 +339,7 @@ function commerce_file_get_product_license($product, $account = NULL) {
->propertyCondition('product_id', $product->product_id)
->propertyCondition('uid', $account->uid);
$result = $query->execute();
- if ($result['commerce_license']) {
+ if (!empty($result['commerce_license'])) {
$license_ids = array_keys($result['commerce_license']);
$licenses[$product->product_id] = entity_load_single('commerce_license', reset($license_ids));
}