Re: cvs: php4 /ext/odbc php_odbc.c
| From: | Andi Gutmans | Date: | Thu, 19 Apr 2001 05:17:31 +0000 |
| Subject: | Re: cvs: php4 /ext/odbc php_odbc.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-5162@lists.php.net to get a copy of this message | ||
Why do you need that SEPARATE_ZVAL()? You seem to be using pv_row as read-only.
Also can you please try not to commit \r\n but only \n?
Thanks,
Andi
At 02:31 AM 4/19/2001 +0000, Dan Kalowsky wrote:
kalowsky Wed Apr 18 19:31:23 2001 EDTModified files:/php4/ext/odbc php_odbc.cLog: corrects bug #7488, patch supplied by submitter (torben@php.net). quick local tests show it to work. Index: php4/ext/odbc/php_odbc.c diff -u php4/ext/odbc/php_odbc.c:1.78 php4/ext/odbc/php_odbc.c:1.79--- php4/ext/odbc/php_odbc.c:1.78 Mon Apr 16 19:02:36 2001 +++ php4/ext/odbc/php_odbc.c Wed Apr 18 19:31:23 2001@@ -15,11 +15,12 @@| Authors: Stig Sæther Bakken <ssb@fast.no> | | 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 | + | Kevin N. Shallow <kshallow@tampabay.rr.com> Velocis Support | + | Daniel R. Kalowsky <kalowsky@php.net> | +----------------------------------------------------------------------+*/ -/* $Id: php_odbc.c,v 1.78 2001/04/17 02:02:36 kalowsky Exp $ */ +/* $Id: php_odbc.c,v 1.79 2001/04/19 02:31:23 kalowsky Exp $ */ #include "php.h" #include "php_globals.h" @@ -64,7 +65,7 @@ #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)@@ -85,7 +86,7 @@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)@@ -1363,7 +1364,8 @@break; case 3: if (zend_get_parameters_ex(3, &pv_res, &pv_row, &pv_res_arr) == FAILURE) - WRONG_PARAM_COUNT; + WRONG_PARAM_COUNT; + SEPARATE_ZVAL(pv_row); convert_to_long_ex(pv_row); rownum = (*pv_row)->value.lval; break;@@ -1380,11 +1382,6 @@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);@@ -1922,7 +1919,11 @@return FALSE; } }-#ifdef HAVE_EMPRESS +/* 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; char dsnbuf[300];-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-cvs-unsubscribe@lists.php.net For additional commands, e-mail: php-cvs-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net