fix getsingle apis
return an array that contains the values instead of an array that contains another array
This commit is contained in:
parent
6fd9521f08
commit
2533c97f4c
4 changed files with 27 additions and 16 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue