Hi Dorin, On 18/05/2017 12:17, Matteo Beccati wrote: > Hi Dorin, > > On 18/05/2017 11:41, Dorin Marcoci wrote: >> I meant the case when a bool is passed as string, like >> bindValue('boolparam', false); >> Here it comes as an empty string, not "0", while true comes as "1". > > Please have a look again at my example and the code I linked. How could > it work if what you say is true? > > Please note that the code is in the PDO_PARAM_EVT_EXEC_PRE case.
I'll try again, maybe it's clearer this way: Breakpoint 1, pgsql_stmt_param_hook (stmt=0x7ffff1681000, param=0x7ffff16801e0, event_type=PDO_PARAM_EVT_EXEC_PRE) at .../ext/pdo_pgsql/pgsql_statement.c:383 383 S->param_values[param->paramno] = Z_TYPE_P(parameter) == IS_TRUE ? "t" : "f"; (gdb) printzv parameter [0x7ffff16801e0] bool: false It's not an empty string. Cheers -- Matteo Beccati Development & Consulting - http://www.beccati.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php