From d7ca8caa8305f9cfa0e8aff3252c99fcfb1eb775 Mon Sep 17 00:00:00 2001 From: Myles Beardsmore Date: Wed, 27 Jan 2016 15:49:36 +1300 Subject: [PATCH] Removed is_numeric check in SaveInto function --- code/TagField.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/code/TagField.php b/code/TagField.php index 5b60250..5648974 100644 --- a/code/TagField.php +++ b/code/TagField.php @@ -298,16 +298,14 @@ class TagField extends DropdownField $relation = $record->$name(); foreach ($values as $i => $value) { - if (!is_numeric($value)) { - if (!$this->getCanCreate()) { - unset($values[$i]); - continue; - } - - // Get or create record - $record = $this->getOrCreateTag($value); - $values[$i] = $record->ID; + if (!$this->getCanCreate()) { + unset($values[$i]); + continue; } + + // Get or create record + $record = $this->getOrCreateTag($value); + $values[$i] = $record->ID; } if ($values instanceof SS_List) {