diff options
author | Nikita Popov <nikic@php.net> | 2016-04-29 14:04:23 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2016-04-29 14:06:39 +0200 |
commit | a1c405e0c50c627cdd9a7695b4c7d644238b6b9b (patch) | |
tree | d4dbc04750b2c5e382b202f2db64db28608ce534 /Zend/zend_ini_parser.y | |
parent | 416e22d2bb496da39e95136b1eded64869f10dd0 (diff) | |
download | php-git-a1c405e0c50c627cdd9a7695b4c7d644238b6b9b.tar.gz |
Fix usages of zend_update_constant_ex
If an in-place update in an external zval is performed, it needs
to incref'd beforehand, not afterwards.
Diffstat (limited to 'Zend/zend_ini_parser.y')
-rw-r--r-- | Zend/zend_ini_parser.y | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Zend/zend_ini_parser.y b/Zend/zend_ini_parser.y index 315455bf88..ed047c0c2a 100644 --- a/Zend/zend_ini_parser.y +++ b/Zend/zend_ini_parser.y @@ -132,11 +132,10 @@ static void zend_ini_get_constant(zval *result, zval *name) if (!memchr(Z_STRVAL_P(name), ':', Z_STRLEN_P(name)) && (c = zend_get_constant(Z_STR_P(name))) != 0) { if (Z_TYPE_P(c) != IS_STRING) { - ZVAL_COPY_VALUE(&tmp, c); + ZVAL_COPY(&tmp, c); if (Z_OPT_CONSTANT(tmp)) { zval_update_constant_ex(&tmp, NULL); } - zval_opt_copy_ctor(&tmp); convert_to_string(&tmp); c = &tmp; } |