diff --git a/api/v3/Activity.php b/api/v3/Activity.php index 374faaa929fca08f43e65cbedd9b8afe846cff1d..fc84cc1d73718b588334d26a541c384b71243821 100644 --- a/api/v3/Activity.php +++ b/api/v3/Activity.php @@ -105,9 +105,6 @@ function civicrm_api3_activity_create($params) { $activityDAO->id = $params['id']; $activityDAO->is_current_revision = 0; if (!$activityDAO->save()) { - if (is_object($activityDAO)) { - $activityDAO->free(); - } throw new API_Exception(ts("Unable to revision existing case activity.")); } $createRevision = TRUE; diff --git a/api/v3/Mailing.php b/api/v3/Mailing.php index 73eabba4774ebd72a3e378ec48bdf98637de6833..08159ff5262744fcbfca7f94dac28efa08cfa00b 100644 --- a/api/v3/Mailing.php +++ b/api/v3/Mailing.php @@ -655,7 +655,6 @@ function civicrm_api3_mailing_send_test($params) { 'email_id' => $dao->id, ); } - $dao->free(); foreach ($testEmailParams['emails'] as $key => $email) { $email = trim($email); $contactId = $emailId = NULL; diff --git a/api/v3/MembershipStatus.php b/api/v3/MembershipStatus.php index 18732ddbef1f23c91d7c7b3d7c526c0a208880b8..fabdd80368602f32690c665867163544bb528ecf 100644 --- a/api/v3/MembershipStatus.php +++ b/api/v3/MembershipStatus.php @@ -173,10 +173,8 @@ SELECT start_date, end_date, join_date, membership_type_id } } else { - $dao->free(); throw new API_Exception('did not find a membership record'); } - $dao->free(); return $result; } diff --git a/api/v3/utils.php b/api/v3/utils.php index 73de6ce4f1284423e7c164147d879eb6aefd6b6a..ed8acaa8d8e64ad17ca5c77fc397f7e6fb34b8a1 100644 --- a/api/v3/utils.php +++ b/api/v3/utils.php @@ -218,9 +218,6 @@ function civicrm_api3_create_success($values = 1, $params = array(), $entity = N $result['undefined_fields'] = array_merge($undefined); } } - if (is_object($dao)) { - $dao->free(); - } $result['version'] = 3; if (is_array($values)) {