cphalcon
cphalcon copied to clipboard
[BUG] Phalcon 1.3.1 Error on saving model with whitelist fields
$user = new Users();
$fields = array('username', 'age', 'created_at');
$user->save(array('username'=>'john', 'age'=>18), $fields);
echo $user->age;
above will be output 1 because phalcon changed the integer value 18 to true.
I manage to solved the problem with changed the integer 18 to string '18'.
Are you use mysql? If so, the problem may be resolved in 1.3.2 https://github.com/phalcon/cphalcon/pull/2255
Noted. Thanks, dreamsxin