diff --git a/fancytokens.php b/fancytokens.php index e994665..50d00a0 100644 --- a/fancytokens.php +++ b/fancytokens.php @@ -75,8 +75,11 @@ function fancytokens_civicrm_tokens( &$tokens ){ $standalone_profiles = $result['values'] ; foreach($standalone_profiles as $cur){ - $p_type = $cur['group_type']; + $p_type = ""; + if( isset( $cur['group_type'])){ + $p_type = $cur['group_type']; + } $type_array = explode( "," , $p_type); // Contributions Activity if ( false == ( in_array("Participant", $type_array ) || in_array("Organization", $type_array ) || in_array("Membership", $type_array ) || in_array("Household", $type_array ) || in_array("Contributions", $type_array ) || in_array("Activity", $type_array ) )) {