+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2016 |
+ | Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
*
* @param array $params
* Array array holding id - Id of the contact membership to be deleted.
- *
- * @return array
- * API result array.
+ * @return array API result array.
+ * @throws API_Exception
*/
function civicrm_api3_membership_delete($params) {
if (isset($params['preserve_contribution'])) {
$ids['userId'] = $params['contact_id'];
}
//for edit membership id should be present
+ // probably not required now.
if (!empty($params['id'])) {
$ids['membership'] = $params['id'];
$action = CRM_Core_Action::UPDATE;