Warnings in booking email if field is empty
In the booking information email sent to users I see php warnings below when fields are empty.
The users that were sent this email do not have the fields completed in their Civi record. The duplication is for the primary contact and the secondary contact.
I'm wondering if I should have been suppressing these warnings, or if the code just needs an if clause.
Street Address:
Warning: Undefined array key "street_address" in /opt/drupal/vendor/civicrm/civicrm-packages/Smarty/Smarty.class.php(1979) : eval()'d code on line 156
Street Address:
Warning: Undefined array key "street_address" in /opt/drupal/vendor/civicrm/civicrm-packages/Smarty/Smarty.class.php(1979) : eval()'d code on line 160
Address Line 1:
Warning: Undefined array key "supplemental_address_1" in /opt/drupal/vendor/civicrm/civicrm-packages/Smarty/Smarty.class.php(1979) : eval()'d code on line 169
Address Line 1:
Warning: Undefined array key "supplemental_address_1" in /opt/drupal/vendor/civicrm/civicrm-packages/Smarty/Smarty.class.php(1979) : eval()'d code on line 173
Address Line 2:
Warning: Undefined array key "supplemental_address_2" in /opt/drupal/vendor/civicrm/civicrm-packages/Smarty/Smarty.class.php(1979) : eval()'d code on line 182
Address Line 2:
Warning: Undefined array key "supplemental_address_2" in /opt/drupal/vendor/civicrm/civicrm-packages/Smarty/Smarty.class.php(1979) : eval()'d code on line 186
Town:
Warning: Undefined array key "city" in /opt/drupal/vendor/civicrm/civicrm-packages/Smarty/Smarty.class.php(1979) : eval()'d code on line 195
Town:
Warning: Undefined array key "city" in /opt/drupal/vendor/civicrm/civicrm-packages/Smarty/Smarty.class.php(1979) : eval()'d code on line 199
County:
Warning: Undefined array key "state_province_name" in /opt/drupal/vendor/civicrm/civicrm-packages/Smarty/Smarty.class.php(1979) : eval()'d code on line 208
County:
Warning: Undefined array key "state_province_name" in /opt/drupal/vendor/civicrm/civicrm-packages/Smarty/Smarty.class.php(1979) : eval()'d code on line 212
Country:
Warning: Undefined array key "country" in /opt/drupal/vendor/civicrm/civicrm-packages/Smarty/Smarty.class.php(1979) : eval()'d code on line 221
Country:
Warning: Undefined array key "country" in /opt/drupal/vendor/civicrm/civicrm-packages/Smarty/Smarty.class.php(1979) : eval()'d code on line 225
Post code:
Warning: Undefined array key "postal_code" in /opt/drupal/vendor/civicrm/civicrm-packages/Smarty/Smarty.class.php(1979) : eval()'d code on line 234
Post code:
Warning: Undefined array key "postal_code" in /opt/drupal/vendor/civicrm/civicrm-packages/Smarty/Smarty.class.php(1979) : eval()'d code on line 238
Telephone:
Warning: Undefined array key "phone" in /opt/drupal/vendor/civicrm/civicrm-packages/Smarty/Smarty.class.php(1979) : eval()'d code on line 247
Telephone:
Warning: Undefined array key "phone" in /opt/drupal/vendor/civicrm/civicrm-packages/Smarty/Smarty.class.php(1979) : eval()'d code on line 251
Email:
Warning: Undefined array key "email" in /opt/drupal/vendor/civicrm/civicrm-packages/Smarty/Smarty.class.php(1979) : eval()'d code on line 260
Email:
Warning: Undefined array key "email" in /opt/drupal/vendor/civicrm/civicrm-packages/Smarty/Smarty.class.php(1979) : eval()'d code on line 264
Edited by caprenter