Skip to content

Commit

Permalink
Merge pull request #146 from powdevel/fix-phone-retrieval-with-select…
Browse files Browse the repository at this point in the history
…able-type

Check entity type is set on webform settings before compare
  • Loading branch information
colemanw authored Aug 6, 2018
2 parents 79a723d + 534c6f9 commit 4311abe
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions includes/wf_crm_webform_base.inc
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,11 @@ abstract class wf_crm_webform_base {
$valueFound = false;
foreach($values as $key => $value){
if ((in_array($ent, array('address', 'email')) && $value['location_type_id'] == $setting['location_type_id'])
||
($value['location_type_id'] == $setting['location_type_id'] && $value[$ent.'_type_id'] == $setting[$ent.'_type_id'])
) {
|| (
$value['location_type_id'] == $setting['location_type_id'] &&
(!isset($setting[$ent.'_type_id']) || $value[$ent.'_type_id'] == $setting[$ent.'_type_id'])
)
) {
$reorderedArray[$key] = $value;
$valueFound = true;
unset($values[$key]);
Expand Down

0 comments on commit 4311abe

Please sign in to comment.