diff --git a/code/StringTagField.php b/code/StringTagField.php index 551b5b2..4f5e041 100644 --- a/code/StringTagField.php +++ b/code/StringTagField.php @@ -250,10 +250,20 @@ class StringTagField extends DropdownField $name = $this->getName(); - $record->$name = join(',', $this->Value()); + $record->$name = $this->dataValue(); $record->write(); } + /** + * Ensure that arrays are imploded before being saved + * + * @return mixed|string + */ + public function dataValue() + { + return implode(',', $this->value); + } + /** * Returns a JSON string of tags, for lazy loading. *