From feb45d1d9fc152beff746c83048ff7704cc27ea2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Tue, 1 Mar 2011 10:24:01 +0100 Subject: [PATCH] Do not add empty job address in vcard. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- classes/plvcard.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/classes/plvcard.php b/classes/plvcard.php index e577f25..81d132c 100644 --- a/classes/plvcard.php +++ b/classes/plvcard.php @@ -702,9 +702,11 @@ class PlVCardEntry if (!is_null($role)) { $this->addInGroup($group, 'ROLE', $role); } - $field =& $this->addInGroup($group, 'ADR', - new ADR_Field($postBox, $extra, $street, $city, - $region, $postCode, $country)); + if (!is_null($street)) { + $field =& $this->addInGroup($group, 'ADR', + new ADR_Field($postBox, $extra, $street, $city, + $region, $postCode, $country)); + } $field->TYPE = new PlFlagset(); $field->TYPE->addFlag('work'); return $group; -- 2.1.4