com php-src: Properly update string type flags: Zend/zend_var iables.c
| From: | Dmitry Stogov | Date: | Tue, 12 Sep 2017 22:45:57 +0000 |
| Subject: | com php-src: Properly update string type flags: Zend/zend_var iables.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-99407@lists.php.net to get a copy of this message | ||
Commit: d7a10f0e325ec588b7b5b0f5cb0b61c40161bec7
Author: Dmitry Stogov <dmitry@zend.com> Wed, 13 Sep 2017 01:45:57 +0300
Parents: 83d8ebc9919a50f3927fa854e8f44203cdc8e9a2
Branches: PHP-7.0 PHP-7.1 PHP-7..2 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d7a10f0e325ec588b7b5b0f5cb0b61c40161bec7
Log:
Properly update string type flags
Changed paths:
M Zend/zend_variables.c
Diff:
diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c
index d2d0b96..3a62b6d 100644
--- a/Zend/zend_variables.c
+++ b/Zend/zend_variables.c
@@ -219,8 +219,10 @@ ZEND_API void ZEND_FASTCALL _zval_copy_ctor_func(zval *zvalue
ZEND_FILE_LINE_DC)
{
if (EXPECTED(Z_TYPE_P(zvalue) == IS_ARRAY)) {
ZVAL_ARR(zvalue, zend_array_dup(Z_ARRVAL_P(zvalue)));
- } else if (EXPECTED(Z_TYPE_P(zvalue) == IS_STRING) ||
- EXPECTED(Z_TYPE_P(zvalue) == IS_CONSTANT)) {
+ } else if (EXPECTED(Z_TYPE_P(zvalue) == IS_STRING)) {
+ CHECK_ZVAL_STRING_REL(Z_STR_P(zvalue));
+ ZVAL_NEW_STR(zvalue, zend_string_dup(Z_STR_P(zvalue), 0));
+ } else if (EXPECTED(Z_TYPE_P(zvalue) == IS_CONSTANT)) {
CHECK_ZVAL_STRING_REL(Z_STR_P(zvalue));
Z_STR_P(zvalue) = zend_string_dup(Z_STR_P(zvalue), 0);
} else if (EXPECTED(Z_TYPE_P(zvalue) == IS_CONSTANT_AST)) {