diff --git a/core/model/fieldtypes/Decimal.php b/core/model/fieldtypes/Decimal.php index 140dd5bcb..5b4b1630e 100644 --- a/core/model/fieldtypes/Decimal.php +++ b/core/model/fieldtypes/Decimal.php @@ -31,7 +31,7 @@ class Decimal extends DBField { function saveInto($dataObject) { $fieldName = $this->name; if($fieldName) { - $dataObject->$fieldName = (float)preg_replace('/[^0-9.]/', '', $this->value); + $dataObject->$fieldName = (float)preg_replace('/[^0-9.\-\+]/', '', $this->value); } else { user_error("DBField::saveInto() Called on a nameless '" . get_class($this) . "' object", E_USER_ERROR); }