Merge pull request #1 from priyankakaran26/master
condition check to avoid in_array warning
This commit is contained in:
commit
a298edde04
@ -81,14 +81,16 @@ function fancytokens_civicrm_tokens( &$tokens ){
|
|||||||
|
|
||||||
}
|
}
|
||||||
$type_array = explode( "," , $p_type); // Contributions Activity
|
$type_array = explode( "," , $p_type); // Contributions Activity
|
||||||
if ( false == ( in_array("Participant", $type_array ) || in_array("Membership", $type_array ) || in_array("Household", $type_array ) || in_array("Contributions", $type_array ) || in_array("Activity", $type_array ) )) {
|
if ( is_array( $type_array ) ) {
|
||||||
|
if ( false == ( in_array("Participant", $type_array ) || in_array("Membership", $type_array ) || in_array("Household", $type_array ) || in_array("Contributions", $type_array ) || in_array("Activity", $type_array ) )) {
|
||||||
|
|
||||||
$key = 'communitynews.standaloneprofile___'.$cur['id'] ;
|
$key = 'communitynews.standaloneprofile___'.$cur['id'] ;
|
||||||
$label = $cur['title'].' (id: '.$cur['id'].') :: Forms';
|
$label = $cur['title'].' (id: '.$cur['id'].') :: Forms';
|
||||||
|
|
||||||
$tokens['communitynews'][$key] = $label;
|
$tokens['communitynews'][$key] = $label;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user