- item->jcfields)): ?>
+ item->jcfields) && count($this->item->jcfields)): ?>
-
item->jcfields as $jcfield): ?>
+
diff --git a/site/views/profile/view.html.php b/site/views/profile/view.html.php
index ab4c461..ba3f100 100644
--- a/site/views/profile/view.html.php
+++ b/site/views/profile/view.html.php
@@ -49,9 +49,15 @@ function display($tpl = null)
$fields = FieldsHelper::getFields('com_dd_gmaps_locations.location', $this->item, true);
// Assigne custom fields to $this->item->jcfields
- foreach ($fields as $key => $field)
+ if($fields)
{
- $this->item->jcfields[$field->id] = $field;
+ foreach ($fields as $key => $field)
+ {
+ if($field->value != '')
+ {
+ $this->item->jcfields[$field->id] = $field;
+ }
+ }
}
if (empty($this->item))