From 353746e4d8e5ae2c75905bd2cc62ba7574fede13 Mon Sep 17 00:00:00 2001 From: David McReynolds Date: Tue, 28 Jan 2014 07:04:58 -0800 Subject: [PATCH] fixed issue with field types of float or decimal not being casted correctly --- fuel/modules/fuel/core/MY_Model.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fuel/modules/fuel/core/MY_Model.php b/fuel/modules/fuel/core/MY_Model.php index 6ec818d2f..5c01f4ab1 100755 --- a/fuel/modules/fuel/core/MY_Model.php +++ b/fuel/modules/fuel/core/MY_Model.php @@ -4511,7 +4511,8 @@ public function fill($values = array()) { if ($this->_parent_model->field_type($key) == 'number' AND is_numeric($val)) { - if ($this->_parent_model->field_info($key) == 'float' OR $this->_parent_model->field_info($key) == 'decimal') + $field_info = $this->_parent_model->field_info($key); + if ($field_info['type'] == 'float' OR $field_info['type'] == 'decimal') { $this->$key = (float) $val; }