replace function for compatibility with PHP <7.3
replace array_key_first() by array_shift()
This commit is contained in:
parent
5e068f6d31
commit
26d4497dbe
1 changed files with 2 additions and 2 deletions
|
@ -37,8 +37,8 @@ class CRM_TwingleCampaign_Utils_APIWrapper {
|
|||
|
||||
// Create soft credit for contribution
|
||||
if (array_key_exists('contribution', $response['values'])) {
|
||||
$contribution = $response['values']['contribution']
|
||||
[array_key_first($response['values']['contribution'])];
|
||||
$response_copy = $response;
|
||||
$contribution = array_shift($response_copy['values']['contribution']);
|
||||
if (array_key_exists('campaign_id', $contribution)) {
|
||||
try {
|
||||
$twingle_event = civicrm_api3(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue