summaryrefslogtreecommitdiffstats
path: root/apps/contacts/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/contacts/index.php')
-rw-r--r--apps/contacts/index.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/contacts/index.php b/apps/contacts/index.php
index 1e01b1c9fbd..4330c31043c 100644
--- a/apps/contacts/index.php
+++ b/apps/contacts/index.php
@@ -63,7 +63,8 @@ usort($contacts,'contacts_namesort');
$details = array();
if( !is_null($id) || count($contacts)){
- $contact = OC_Contacts_Addressbook::findCard(is_null($id)?$contacts[0]['id']:$id);
+ if(is_null($id)) $id = $contacts[0]['id'];
+ $contact = OC_Contacts_Addressbook::findCard($id);
$vcard = Sabre_VObject_Reader::read($contact['carddata']);
$details = OC_Contacts_Addressbook::structureContact($vcard);
}