Skip to content
Snippets Groups Projects
Commit 90e09db8 authored by colemanw's avatar colemanw
Browse files

Fix #5 - return api3 result as array

parent 5dc90a4c
No related branches found
No related tags found
1 merge request!2Fix #5 - return api3 result as array
......@@ -11,14 +11,14 @@
function civicrm_api3_job_firewall_cleanup($params) {
$results = [];
if ($params['delete_old'] !== 0 && !empty($params['delete_old'])) {
if (!empty($params['delete_old'])) {
// Delete all locally recorded paymentIntents that are older than 3 months
$results = \Civi\Api4\FirewallIpaddress::delete()
->addWhere('access_date', '<', ['delete_old'])
->execute();
}
return civicrm_api3_create_success($results, $params);
return civicrm_api3_create_success((array) $results, $params);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment