FaaPz/PDO

Invalid value for insert statement when trying to insert NULL

copostic opened this issue · 4 comments

Hi,

I have an error when I have a NULL value on INSERT.
It just need a little modification to add is_null on Statement/Insert.php because is_scalar return false for NULL.
image

kwhat commented

Can you provide a little more detail? I don't understand how to reproduce this issue.

I programatically create the import from a JSON. When I loop, I sometime have value = NULL, to reset a value for example, so I would like to make an insert with value NULL but I have an error "Invalid value for insert statement".
When I add those two "is_null..." the problem caused by the fact that is_scalar return false for NULL is solved.

I hope I've made myself more clear, otherwise tell me :)

@copostic , the issue was fixed in latest commit (2021-09-20).

kwhat commented

Should be resolved.