Contacts: check if PREF parameter is set before useing it

This commit is contained in:
Bart Visscher 2011-12-18 23:05:36 +01:00
parent dff9585f64
commit fbad1da9e2
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@
<span style="display:none;" data-use="delete"><img class="svg action" src="<?php echo image_path('', 'actions/delete.svg'); ?>" /></span>
</p>
<?php elseif($_['property']['name'] == 'TEL'): ?>
<p class="contacts_property_name"><?php echo $_['property']['parameters']['PREF'] ? $l->t('Preferred').' ' : '' ?><?php echo $l->t('Phone'); ?></p>
<p class="contacts_property_name"><?php echo (isset($_['property']['parameters']['PREF']) && $_['property']['parameters']['PREF']) ? $l->t('Preferred').' ' : '' ?><?php echo $l->t('Phone'); ?></p>
<p class="contacts_property_data">
<?php echo $_['property']['value']; ?>
<?php if(isset($_['property']['parameters']['TYPE']) && !empty($_['property']['parameters']['TYPE'])): ?>