ZF-12354: Create Row do not accept false value

Description

When i go to create a new row $model->createRow(); if my array has a key with false value it's change to null.

So if I save it and the field at the database don't accept null value, i get an error.

Comments

You must manually cast the value to whatever your database expects. This is not the responsibility of Zend Framework.

For example to cast to an ENUM value "true" or "false", you can do:


$x = false;
$foo->createRow(
    array(
       'baz' => $x ? 'true' : 'false'
    )
);

Or to cast to an integer:


$x = false;
$foo->createRow(
    array(
       'baz' => (int) $x
    )
);

Closing this issue.

I'm already doing like this, convert to a string, But it's not nice.

I've made some test's an seems to me that is a PHP bug at __set, i have made some var_dump's over there.