Ver código fonte

fixed address field bug

Bachir Soussi Chiadmi 10 anos atrás
pai
commit
d214a86eeb
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2 1
      materio_user.module

+ 2 - 1
materio_user.module

@@ -262,7 +262,8 @@ function materio_user_webform_client_11186_form_alter(&$form, &$form_state, $for
   $columnright['company']['d']['vat_number_intra_ce']['#default_value'] = $member_profile->field_vat_number_intra_ce['und'][0]['value'];
   $columnright['company']['d']['website']['#default_value'] = $member_profile->field_user_website['und'][0]['url'];
 
-  if($address = $member_profile->field_adresse['und'][0]){
+  if( isset($member_profile->field_adresse['und'][0]) ){
+    $address = $member_profile->field_adresse['und'][0];
     $formaddress = &$columnright['company']['location']['#address'];
     $formaddress['country'] = $address['country'];
     $formaddress['thoroughfare'] = $address['thoroughfare'];