Avoid array_key_exists() on NULL

This commit is contained in:
Dominic Tubach 2024-04-22 10:10:51 +02:00
parent bcd2b448d2
commit cbb148b22f

View file

@ -129,11 +129,7 @@ class CRM_TwingleCampaign_Utils_APIWrapper {
}
}
}
elseif (array_key_exists(
'event',
$apiRequest['params']['custom_fields']) &&
!empty($apiRequest['params']['custom_fields']['event'])
) {
elseif (!empty($apiRequest['params']['custom_fields']['event'])) {
try {
$targetCampaign = civicrm_api3(
'TwingleEvent',