Skip to content

Commit

Permalink
Merge pull request #13393 from eileenmcnaughton/free
Browse files Browse the repository at this point in the history
dev/core#562 remove calls to dao->free() from api folder
  • Loading branch information
seamuslee001 authored Jan 7, 2019
2 parents 050e949 + b026ac8 commit 46703d6
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 9 deletions.
3 changes: 0 additions & 3 deletions api/v3/Activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion api/v3/Mailing.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions api/v3/MembershipStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,8 @@ function civicrm_api3_membership_status_calc($membershipParams) {
}
}
else {
$dao->free();
throw new API_Exception('did not find a membership record');
}
$dao->free();
return $result;
}

Expand Down
3 changes: 0 additions & 3 deletions api/v3/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 46703d6

Please sign in to comment.