Mysqli driver cast floats as double, causing auto-validation to fail

edited September 2014 in Bug Reports
Related to: http://grokbase.com/t/php/php-bugs/148efnrtgs/php-bug-bug-67839-new-mysqli-does-not-handle-4-byte-floats-correctly

floats are cast as double by Mysqli, so rule length_max is added, but max_length is null and validation fails

MY_Model.php line 2314

if ($field_data['type'] != 'float') $this->validator->add_rule($field, 'length_max', lang('error_value_exceeds_length', $field_name), array($value, $field_data['max_length']));

Could this be changed to:

if ($field_data['type'] == 'int'

Comments

Sign In or Register to comment.