>
> I've had a quick look at the bug fix, although I haven't tested it. By
> the looks of it, it seems that the third parameter has become mandatory,
> which to me seems unacceptable.
>
> I would say that the type parameter should have precedence over the
> actual PHP type only when it is explicitly passed.


PDO::PARAM_STR is documented as the default value. I'd worry about adding
nuance to the API, potentially creating more edge cases.

Another option would be to assume that all types are nullable. That is, if
a zval IS_NULL, quote in SQL as "NULL" regardless of the specified type.
Doing so would mean I could revert the test changes I made. The API would
be a little less doctrinaire, but probably more practical.

Reply via email to