diff --git a/commerce_file.module b/commerce_file.module index 953ad2e82b317b408475244dec0c3f4567d9f007..9fa56dd5697ed5a9cc703aada0bbb056c5f7bec0 100644 --- a/commerce_file.module +++ b/commerce_file.module @@ -285,7 +285,7 @@ function commerce_file_get_license($op, $file, $account = NULL) { ->propertyCondition('uid', $account->uid) ->entityOrderby('entity_id', 'ASC'); $result = $query->execute(); - if ($result['commerce_license']) { + if (!empty($result['commerce_license'])) { $license_ids = array_keys($result['commerce_license']); $loaded_licenses = entity_load('commerce_license', $license_ids); // Go through all loaded licenses and check their eligibility.