| Andreas Karajannis <Andreas.Karajannis@gmd.de> |
| Frank M. Kromann <frank@frontbase.com> Support for DB/2 CLI |
| Kevin N. Shallow <kshallow@tampabay.rr.com> Velocis Support |
+ | Daniel R. Kalowsky <kalowsky@php.net> |
+----------------------------------------------------------------------+
*/
#define SAFE_SQL_NTS(n) ((SWORD) ((n)?(SQL_NTS):0))
-static unsigned char a3_arg3_force_ref[] = { 3, BYREF_NONE, BYREF_ALLOW, BYREF_FORCE };
+static unsigned char a3_arg3_and_3_force_ref[] = { 3, BYREF_NONE, BYREF_FORCE, BYREF_FORCE };
function_entry odbc_functions[] = {
PHP_FE(odbc_error, NULL)
PHP_FE(odbc_prepare, NULL)
PHP_FE(odbc_execute, NULL)
PHP_FE(odbc_fetch_row, NULL)
- PHP_FE(odbc_fetch_into, a3_arg3_force_ref)
+ PHP_FE(odbc_fetch_into, a3_arg3_and_3_force_ref)
PHP_FE(odbc_field_len, NULL)
PHP_FE(odbc_field_scale, NULL)
PHP_FE(odbc_field_name, NULL)
case 3:
if (zend_get_parameters_ex(3, &pv_res, &pv_row, &pv_res_arr) == FAILURE)
WRONG_PARAM_COUNT;
+ SEPARATE_ZVAL(pv_row);
convert_to_long_ex(pv_row);
rownum = (*pv_row)->value.lval;
break;
WRONG_PARAM_COUNT;
}
#endif
-
- if (!ParameterPassedByReference(ht, numArgs)) {
- php_error(E_WARNING, "Array not passed by reference in call to odbc_fetch_into()");
- RETURN_FALSE;
- }
ZEND_FETCH_RESOURCE(result, odbc_result *, pv_res, -1, "ODBC result", le_result);
return FALSE;
}
}
+/* Possible fix for bug #
+ * Needs testing on UnixODBC < 2.0.5 though.
+ * #if defined(HAVE_EMPRESS) || defined(HAVE_UNIXODBC)
+ * Uncomment the line above, and comment line below to fully test */
#ifdef HAVE_EMPRESS
{
int direct = 0;