summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2007-11-13 20:08:04 +0000
committerIlia Alshanetsky <iliaa@php.net>2007-11-13 20:08:04 +0000
commit916ad03b84e5d70ad8ba76fe86ea030427b94f3d (patch)
treeaf6d16468cdbe8c04d9a02a11deff101e34c55a2 /ext
parent5c6a2679c897fec5e675690b891b79cc2d18440c (diff)
downloadphp-git-916ad03b84e5d70ad8ba76fe86ea030427b94f3d.tar.gz
MFB: Fixed bug #43279 (pg_send_query_params() converts all elements in
'params' to strings)
Diffstat (limited to 'ext')
-rw-r--r--ext/pgsql/pgsql.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index b351cd15b6..2e6ac5102e 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -4083,6 +4083,7 @@ PHP_FUNCTION(pg_send_query_params)
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) {
@@ -4097,7 +4098,8 @@ PHP_FUNCTION(pg_send_query_params)
}
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);