X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FOrder.php;h=e570855b57a9b1081237f7a8b2959c304d08b3d2;hb=3e46951c9b58ae37787351fb840bd396457b2d80;hp=e895e0fc1146d5ee3d6afd868f3be97d8b663a49;hpb=068fdda3945ee61fec06d5911051102384240bf7;p=civicrm-core.git diff --git a/api/v3/Order.php b/api/v3/Order.php index e895e0fc11..e570855b57 100644 --- a/api/v3/Order.php +++ b/api/v3/Order.php @@ -45,7 +45,7 @@ function civicrm_api3_order_get($params) { $contributions = []; $params['api.line_item.get'] = ['qty' => ['<>' => 0]]; $isSequential = FALSE; - if (CRM_Utils_Array::value('sequential', $params)) { + if (!empty($params['sequential'])) { $params['sequential'] = 0; $isSequential = TRUE; } @@ -84,11 +84,11 @@ function _civicrm_api3_order_get_spec(&$params) { * @return array * Api result array */ -function civicrm_api3_order_create(&$params) { +function civicrm_api3_order_create($params) { $entity = NULL; $entityIds = []; - if (CRM_Utils_Array::value('line_items', $params) && is_array($params['line_items'])) { + if (!empty($params['line_items']) && is_array($params['line_items'])) { $priceSetID = NULL; CRM_Contribute_BAO_Contribution::checkLineItems($params); foreach ($params['line_items'] as $lineItems) { @@ -124,7 +124,7 @@ function civicrm_api3_order_create(&$params) { } $contribution = civicrm_api3('Contribution', 'create', $params); // add payments - if ($entity && CRM_Utils_Array::value('id', $contribution)) { + if ($entity && !empty($contribution['id'])) { foreach ($entityIds as $entityId) { $paymentParams = [ 'contribution_id' => $contribution['id'],