projects
/
m6w6
/
ext-pq
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
update from docs
[m6w6/ext-pq]
/
src
/
php_pqres.c
diff --git
a/src/php_pqres.c
b/src/php_pqres.c
index eaaac6927dc96418e4708fac4413c2e7a2a791aa..9b35f21011bde83dce3db70fb7cfec92c3597897 100644
(file)
--- a/
src/php_pqres.c
+++ b/
src/php_pqres.c
@@
-98,10
+98,13
@@
zval *php_pqres_typed_zval(php_pqres_t *res, char *val, size_t len, Oid typ TSRM
MAKE_STD_ZVAL(zv);
if (SUCCESS == zend_hash_index_find(&res->converters, typ, (void *) &zconv)) {
MAKE_STD_ZVAL(zv);
if (SUCCESS == zend_hash_index_find(&res->converters, typ, (void *) &zconv)) {
- zval *tmp = NULL;
+ zval *
ztype, *
tmp = NULL;
+ MAKE_STD_ZVAL(ztype);
+ ZVAL_LONG(ztype, typ);
ZVAL_STRINGL(zv, val, len, 1);
ZVAL_STRINGL(zv, val, len, 1);
- zend_call_method_with_1_params(zconv, NULL, NULL, "convertfromstring", &tmp, zv);
+ zend_call_method_with_2_params(zconv, NULL, NULL, "convertfromstring", &tmp, zv, ztype);
+ zval_ptr_dtor(&ztype);
if (tmp) {
zval_ptr_dtor(&zv);
if (tmp) {
zval_ptr_dtor(&zv);