parents-merge 33148 - Fixed decimal saving

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@45040 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2007-11-19 01:15:05 +00:00
parent f246e4fbe2
commit 8547c5c333

View File

@ -26,7 +26,7 @@ class Decimal extends DBField {
DB::requireField($this->tableName, $this->name, "decimal($this->wholeSize,$this->decimalSize)");
}
function saveInto() {
function saveInto($dataObject) {
$fieldName = $this->name;
if($fieldName) {
$dataObject->$fieldName = (float)preg_replace('/[^0-9.]/', '', $this->value);