From 00f0791c06fb4f65af3dc1ca4a1f0087a67ff3ec Mon Sep 17 00:00:00 2001 From: Jon <1796012+MegaphoneJon@users.noreply.github.com> Date: Mon, 25 Nov 2024 16:30:06 -0500 Subject: [PATCH] Revert "Fix check permissions in civicrm_api call (#1019)" (#1026) This reverts commit 4df2f24d8f8bbd217537799b706af27cddebebbf. --- src/Utils.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Utils.php b/src/Utils.php index f99c7437d..61b930cf2 100644 --- a/src/Utils.php +++ b/src/Utils.php @@ -632,7 +632,9 @@ function wf_civicrm_api4($entity, $operation, $params, $index = NULL) { if (!$entity) { return []; } - $params['checkPermissions'] = FALSE; + $params += [ + 'checkPermissions' => FALSE, + ]; $result = civicrm_api4($entity, $operation, $params, $index); return $result; } @@ -656,7 +658,9 @@ function wf_civicrm_api($entity, $operation, $params) { return []; } - $params['check_permissions'] = FALSE; + $params += [ + 'check_permissions' => FALSE, + ]; if ($operation == 'transact') { $utils = \Drupal::service('webform_civicrm.utils'); $result = $utils->wf_civicrm_api3_contribution_transact($params);