Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix db_query_bound() to work with ADOdb::Execute()
In ADOdb v5.19 the Execute() method was modified to perform a strict type check on the $inputarr parameter. Since that param defaults to 'false', database errors are triggered when the method receives 'null' and there are no parameters to the query being executed. Since db_query_bound() $p_arr_parms defaults to null, the problem occurs almost everywhere. To fix this, we can either: 1. set $p_arr_parms to array() when it is null 2. defaut $p_arr_parms to array() The 2nd option would cause errors with db_query_bound($sql, null) calls, so we implement the first one as it offers better backwards compatibility. Function can be called like this (the first 3 methods being equivalent): - db_query_bound($sql) - db_query_bound($sql, null) - db_query_bound($sql, array()) - db_query_bound($sql, array(1,2))
- Loading branch information