iliaa Tue Nov 13 20:08:17 2007 UTC
Modified files:
/php-src/ext/pgsql pgsql.c
Log:
MFB: Fixed bug #43279 (pg_send_query_params() converts all elements in
'params'
to strings)
http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/pgsql.c?r1=1.374&r2=1.375&diff_format=u
Index: php-src/ext/pgsql/pgsql.c
diff -u php-src/ext/pgsql/pgsql.c:1.374 php-src/ext/pgsql/pgsql.c:1.375
--- php-src/ext/pgsql/pgsql.c:1.374 Wed Oct 3 23:31:04 2007
+++ php-src/ext/pgsql/pgsql.c Tue Nov 13 20:08:17 2007
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pgsql.c,v 1.374 2007/10/03 23:31:04 iliaa Exp $ */
+/* $Id: pgsql.c,v 1.375 2007/11/13 20:08:17 iliaa Exp $ */
#include <stdlib.h>
@@ -4061,6 +4061,7 @@
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "There are results
on this connection. Call pg_get_result() until it returns FALSE");
}
+ SEPARATE_ZVAL(pv_param_arr);
zend_hash_internal_pointer_reset(Z_ARRVAL_PP(pv_param_arr));
num_params = zend_hash_num_elements(Z_ARRVAL_PP(pv_param_arr));
if (num_params > 0) {
@@ -4075,7 +4076,8 @@
}
otype = (*tmp)->type;
- convert_to_string(*tmp);
+ SEPARATE_ZVAL(tmp);
+ convert_to_string_ex(tmp);
if (Z_TYPE_PP(tmp) != IS_STRING) {
php_error_docref(NULL TSRMLS_CC,
E_WARNING,"Error converting parameter");
_php_pgsql_free_params(params, num_params);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php