fix getsingle apis

return an array that contains the values instead of an array that contains another array
This commit is contained in:
Marc Michalsky forumZFD 2021-02-09 16:30:43 +01:00
parent 6fd9521f08
commit 2533c97f4c
Signed by untrusted user who does not match committer: marc.koch
GPG key ID: 12406554CFB028B9
4 changed files with 27 additions and 16 deletions

View file

@ -113,15 +113,15 @@ function civicrm_api3_twingle_event_Sync(array $params): array {
if ($result['is_error'] == 0) {
// Get the event from Twingle
if ($result['values'][0]['event_id']) {
if ($result['values']['event_id']) {
$event_from_twingle = $twingleApi->getEvent(
$result['values'][0]['project_id'],
$result['values'][0]['event_id']
$result['values']['project_id'],
$result['values']['event_id']
);
// instantiate event from CiviCRM
try {
$event = _instantiateEvent($result['values'][0]);
$event = _instantiateEvent($result['values']);
} catch (CiviCRM_API3_Exception $e) {
Civi::log()->error(
$e->getMessage(),