diff --git a/site/plugins/form/app/Controllers/FormController.php b/site/plugins/form/app/Controllers/FormController.php index 54542bfd..5e9f7fb6 100644 --- a/site/plugins/form/app/Controllers/FormController.php +++ b/site/plugins/form/app/Controllers/FormController.php @@ -535,8 +535,10 @@ class FormController extends Controller $name = isset($properties['name']) ? $properties['name'] : $field_name; $current_value = isset($properties['value']) ? $properties['value'] : $field_value; - $current_value = array_map('trim', explode(',', $current_value)); - + if (! empty($current_value)) { + $current_value = array_map('trim', explode(',', $current_value)); + } + return $this->flextype['view']->fetch('plugins/form/templates/fields/tags/field.html', ['title' => $title, 'size' => $size, 'name' => $name, 'id' => $id, 'class' => $class, 'help' => $help , 'options' => $options, 'current_value' => $current_value]); }