cvs: php4 /ext/odbc/
| From: | Andreas Karajannis | Date: | Thu, 11 May 2000 16:24:03 +0000 |
| Subject: | cvs: php4 /ext/odbc/ | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-14858@lists.php.net to get a copy of this message | ||
kara Thu May 11 18:24:03 2000 EDT
Modified files:
/php4/ext/odbc php_odbc.c
Log:
Restoring old parameter ordering in odbc_fetch_into()
Index: php4/ext/odbc/php_odbc.c
diff -u php4/ext/odbc/php_odbc.c:1.45 php4/ext/odbc/php_odbc.c:1.46
--- php4/ext/odbc/php_odbc.c:1.45 Thu May 11 14:10:53 2000
+++ php4/ext/odbc/php_odbc.c Thu May 11 18:24:03 2000
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_odbc.c,v 1.45 2000/05/11 12:10:53 eschmid Exp $ */
+/* $Id: php_odbc.c,v 1.46 2000/05/11 16:24:03 kara Exp $ */
#if defined(COMPILE_DL) || defined(COMPILE_DL_ODBC)
#include "dl/phpdl.h"
@@ -67,7 +67,7 @@
#define SAFE_SQL_NTS(n) ((SWORD) ((n)?(SQL_NTS):0))
-static unsigned char a3_arg2_force_ref[] = { 3, BYREF_NONE, BYREF_FORCE, BYREF_NONE };
+static unsigned char a3_arg3_force_ref[] = { 3, BYREF_NONE, BYREF_ALLOW, BYREF_FORCE };
function_entry odbc_functions[] = {
PHP_FE(odbc_setoption, NULL)
@@ -82,7 +82,7 @@
PHP_FE(odbc_prepare, NULL)
PHP_FE(odbc_execute, NULL)
PHP_FE(odbc_fetch_row, NULL)
- PHP_FE(odbc_fetch_into, a3_arg2_force_ref)
+ PHP_FE(odbc_fetch_into, a3_arg3_force_ref)
PHP_FE(odbc_field_len, NULL)
PHP_FE(odbc_field_scale, NULL)
PHP_FE(odbc_field_name, NULL)
@@ -1113,7 +1113,7 @@
WRONG_PARAM_COUNT;
break;
case 3:
- if (zend_get_parameters_ex(3, &pv_res, &pv_res_arr, &pv_row) == FAILURE)
+ if (zend_get_parameters_ex(3, &pv_res, &pv_row, &pv_res_arr) == FAILURE)
WRONG_PARAM_COUNT;
convert_to_long_ex(pv_row);
rownum = (*pv_row)->value.lval;
@@ -1122,10 +1122,6 @@
WRONG_PARAM_COUNT;
}
- if (!ParameterPassedByReference(ht, 2)) {
- php_error(E_WARNING, "Array not passed by reference in call to odbc_fetch_into()");
- RETURN_FALSE;
- }
#else
pval **pv_res, **pv_res_arr, *tmp;
@@ -1134,12 +1130,12 @@
if (numArgs != 2 || zend_get_parameters_ex(2, &pv_res, &pv_res_arr) == FAILURE) {
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;
}
-#endif
ZEND_FETCH_RESOURCE(result, odbc_result *, pv_res, -1, "ODBC result", le_result);