iliaa Tue Nov 13 20:05:47 2007 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/pgsql pgsql.c
Log:
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.331.2.13.2.24.2.3&r2=1.331.2.13.2.24.2.4&diff_format=u
Index: php-src/ext/pgsql/pgsql.c
diff -u php-src/ext/pgsql/pgsql.c:1.331.2.13.2.24.2.3
php-src/ext/pgsql/pgsql.c:1.331.2.13.2.24.2.4
--- php-src/ext/pgsql/pgsql.c:1.331.2.13.2.24.2.3 Fri Oct 5 15:00:08 2007
+++ php-src/ext/pgsql/pgsql.c Tue Nov 13 20:05:47 2007
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pgsql.c,v 1.331.2.13.2.24.2.3 2007/10/05 15:00:08 jani Exp $ */
+/* $Id: pgsql.c,v 1.331.2.13.2.24.2.4 2007/11/13 20:05:47 iliaa Exp $ */
#include <stdlib.h>
@@ -4084,6 +4084,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) {
@@ -4098,7 +4099,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