CRM-16259, fixed notice error
authorPradeep Nayak <pradpnayak@gmail.com>
Wed, 20 Jan 2016 09:10:16 +0000 (14:40 +0530)
committerPradeep Nayak <pradpnayak@gmail.com>
Wed, 20 Jan 2016 09:10:16 +0000 (14:40 +0530)
----------------------------------------
* CRM-16259: Create Payment API
  https://issues.civicrm.org/jira/browse/CRM-16259

api/v3/Payment.php

index f843ded7d22b674516f81874415a48a6c7e5fb95..8c171e8a4b1d86602de216d972f08e534a336548 100644 (file)
@@ -121,7 +121,7 @@ function civicrm_api3_payment_cancel(&$params) {
  */
 function civicrm_api3_payment_create(&$params) {
   // Check if it is an update
-  if ($params['id']) {
+  if (CRM_Utils_Array::value ('id', $params)) {
     $amount = $params['total_amount'];
     civicrm_api3('Payment', 'cancel', $params);
     $params['total_amount'] = $amount;