mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
f246e4fbe2
commit
8547c5c333
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user