float rounded when retrieved in view

edited January 2014 in News & Announcements
I have a simple module with a field 'price' that is a float in my database.

I tried to retrieve the value (wich is 123.45) with

$stays = fuel_model('stays', array('find' => 'all'));

foreach($stays as $s) {
print_r($s->price);
}
it returns 123. Can you explain me why ? In the admin form and also in the list it displays, as attended, 123.45.

Comments

  • edited 6:01AM
    That appears to be a bug. I've posted a fix in the develop branch which will be included in the next patch release.
Sign In or Register to comment.