Skip to content

Commit

Permalink
fixed issue with field types of float or decimal not being casted cor…
Browse files Browse the repository at this point in the history
…rectly
  • Loading branch information
David McReynolds committed Jan 28, 2014
1 parent d5fbea4 commit 353746e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fuel/modules/fuel/core/MY_Model.php
Expand Up @@ -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;
}
Expand Down

1 comment on commit 353746e

@kbjohnson90
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed my issue.

Please sign in to comment.