From e460d923f8b8323eddf87f7c5e4ff275f2d2b7b5 Mon Sep 17 00:00:00 2001 From: Marc Michalsky forumZFD Date: Thu, 12 Nov 2020 13:52:38 +0100 Subject: [PATCH] trim Twingle api key --- api/v3/TwingleSync/Post.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/v3/TwingleSync/Post.php b/api/v3/TwingleSync/Post.php index 3aadb97..977d07a 100644 --- a/api/v3/TwingleSync/Post.php +++ b/api/v3/TwingleSync/Post.php @@ -64,8 +64,8 @@ function civicrm_api3_twingle_sync_Post(array $params) { // If function call provides an API key, use it instead of the API key set // on the extension settings page $apiKey = empty($params['twingle_api_key']) - ? CRM_Core_BAO_Setting::getItem('', 'twingle_api_key') - : $params['twingle_api_key']; + ? trim(Civi::settings()->get('twingle_api_key')) + : trim($params['twingle_api_key']); // If function call does not provide a limit, set a default value $limit = empty($params['limit']) ?? 20; $twingleApi = new TwingleApiCall($apiKey, $limit);