Commit fe945c72 authored by mattwire's avatar mattwire

Merge branch 'colemanw-master-patch-68360' into 'master'

Fix #5 - return api3 result as array

Closes #5

See merge request !2
parents 5dc90a4c 90e09db8
......@@ -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);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment