vcard might be without email fields.
authortokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 1 Sep 2004 17:04:40 +0000 (17:04 +0000)
committertokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 1 Sep 2004 17:04:40 +0000 (17:04 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7998 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/vcard.php

index c96dab567ede1657accf722b87142d8c41b4c45d..3f9025524f712510d4f6e8196349909d09f1e0d3 100644 (file)
@@ -193,10 +193,12 @@ echo    addSelect('addaddr[label]', $opts, '', TRUE);
 </td></tr>
 <tr><td colspan="2" align="center">
 <?php
-echo addHidden('addaddr[email]', $vcard_nice['email;internet']).
-     addHidden('addaddr[firstname]', $vcard_safe['firstname']).
-     addHidden('addaddr[lastname]', $vcard_safe['lastname']).
-     addSubmit(_("Add to Address Book"), 'addaddr[SUBMIT]');
+if (isset($vcard_nice['email;internet']))
+    echo addHidden('addaddr[email]', $vcard_nice['email;internet']);
+
+echo addHidden('addaddr[firstname]', $vcard_safe['firstname']).
+    addHidden('addaddr[lastname]', $vcard_safe['lastname']).
+    addSubmit(_("Add to Address Book"), 'addaddr[SUBMIT]');
 ?>
 </td></tr>
 </table>