Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.
1 to 2 of 2
Hello again folks,
EDIT: Reading the similar question in http://forum.akelos.org/discussion/215/updateattribute-strange-behaviour/ with no solution in the beggining, maybe I can give a bit more information.
I'm having a strange behaviour editing (or adding) registers through akelos forms with fields that contains numbers. Will explain it:
I have a table that, ids, foreign keys and other data apart, has four integer fields like this one
min_value int(11) unsigned not null default '0'
The form appears and this field has a integer value that other script has filled in previously, let's say 635 and I edit the field placing a cero 0 on it... When I save the field still keeps the 635 value. Changing it to a > 0 value the edit works right, for example placing a 1 on the field.
I've debugged the process that saves the edited register and I've found that the function is "cleaning" the field value is castAttributeForDatabase (AkActiveRecord.php line 3256), more precisely in the last return line:
return empty($this->_columns[$column_name]['notNull']) ? ($result === '' ? "''" : $result) : ($result == 'null' ? '' : $result);
When arrives to this point the last $result == 'null' ? comparison returns true (when $result in that moment is (int)0. So, the function returns an empty value. All the other fields are saved okay, but the emptied ones are obviously ignored.
Why does it happen? I'm absolutely stuck with this :P
Thanks in advance, as always ^
ty, follow-up is here
feel free to create a ticket
1 to 2 of 2