From 59515d5976504bd5b08598ef0b3e3160c52bece6 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Wed, 16 Mar 2011 14:52:42 -0700 Subject: [PATCH] Extended profile - don't show rel for empty phone number --- plugins/ExtendedProfile/extendedprofilewidget.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/ExtendedProfile/extendedprofilewidget.php b/plugins/ExtendedProfile/extendedprofilewidget.php index b507713f06..53cb5d3b87 100644 --- a/plugins/ExtendedProfile/extendedprofilewidget.php +++ b/plugins/ExtendedProfile/extendedprofilewidget.php @@ -160,9 +160,11 @@ class ExtendedProfileWidget extends Form protected function showPhone($name, $field) { $this->out->elementStart('div', array('class' => 'phone-display')); - $this->out->text($field['value']); - if (!empty($field['rel'])) { - $this->out->text(' (' . $field['rel'] . ')'); + if (!empty($field['value'])) { + $this->out->text($field['value']); + if (!empty($field['rel'])) { + $this->out->text(' (' . $field['rel'] . ')'); + } } $this->out->elementEnd('div'); } -- 2.39.5