[php-src] Issue #8253: pg_insert fails if one of the values has been passed by reference

From: Date: Sat, 26 Mar 2022 12:18:57 +0000
Subject: [php-src] Issue #8253: pg_insert fails if one of the values has been passed by reference
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-240509@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/8253 Comment Author: cmb69 I think we need to deref the value: ````.diff ext/pgsql/pgsql.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 70a78643fa..64bce7dda4 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -4595,6 +4595,7 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, con ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(values), field, val) { skip_field = 0; + ZVAL_DEREF(val); ZVAL_NULL(&new_val); /* TODO: Check when meta data can be broken and see if can use assertions instead */ ````

« previous php.bugs (#240509) next »