trim Twingle api key

This commit is contained in:
Marc Michalsky forumZFD 2020-11-12 13:52:38 +01:00
parent 38d4db8a3f
commit e460d923f8
Signed by untrusted user who does not match committer: marc.koch
GPG key ID: 12406554CFB028B9

View file

@ -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);