Skip to content

Commit 4772638

Browse files
author
Serverfire
authored
Merge pull request #19 from flaxandteal/bug/tags-set-values-array
Ensure sure $this->values and $this->local_options gets set for tags
2 parents ea3c659 + b329564 commit 4772638

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/DataForm/Field/Tags.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Tags extends Field
1616
public $remote;
1717
public $separator = " ";
1818
public $serialization_sep = ",";
19-
public $local_options;
19+
public $local_options = [];
2020

2121
public $record_id;
2222
public $record_label;
@@ -55,6 +55,13 @@ public function getValue()
5555
}
5656
parent::getValue();
5757

58+
if (is_array($this->value)) {
59+
$this->values = $this->value;
60+
}
61+
else {
62+
$this->values = explode($this->serialization_sep, $this->value);
63+
}
64+
5865
if (count($this->local_options)) {
5966
$description_arr = array();
6067
$this->fill_tags = "";

0 commit comments

Comments
 (0)