CRM-16526 CIVI-3 Added check only when check permissions is specified for lineitems
[civicrm-core.git] / CRM / Price / BAO / LineItem.php
index b813d3c3b90ec5acc9d28a0dd748a03c7988fc30..cb750b32bc60911e323fd03483d9c280b40c0016 100644 (file)
@@ -69,7 +69,7 @@ class CRM_Price_BAO_LineItem extends CRM_Price_DAO_LineItem {
     if ($id) {
       unset($params['entity_id'], $params['entity_table']);
     }
-    if (CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus()) {
+    if (CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus() && CRM_Utils_Array::value('check_permissions', $params)) {
       if (empty($params['financial_type_id'])) {
         throw new Exception('Mandatory key(s) missing from params array: financial_type_id');
       }