From 54895965e8aee6d65f6cf722037514993346d204 Mon Sep 17 00:00:00 2001
From: davidjeliba <djeliba@gmail.com>
Date: Thu, 27 Aug 2015 11:25:58 +1000
Subject: [PATCH] Fixed issue where empty keywords field would be passed to
 array functions as a string.

---
 code/StringTagField.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/code/StringTagField.php b/code/StringTagField.php
index c678a4b..3abceaf 100644
--- a/code/StringTagField.php
+++ b/code/StringTagField.php
@@ -177,7 +177,7 @@ class StringTagField extends DropdownField {
 
 		if($source instanceof DataObject) {
 			$name = $this->getName();
-			$value = $source->$name;
+			$value = explode(',', $source->$name);
 		}
 
 		if($source instanceof SS_List) {