]> granicus.if.org Git - php/commitdiff
Revert "Properly update string type flags"
authorDmitry Stogov <dmitry@zend.com>
Tue, 12 Sep 2017 21:14:39 +0000 (00:14 +0300)
committerDmitry Stogov <dmitry@zend.com>
Tue, 12 Sep 2017 21:14:39 +0000 (00:14 +0300)
This reverts commit 99b1a62d559f993ed02c50e6a4298c4bd2dcd33c.

Zend/zend_variables.c

index b16fb8424d564cb737df3309c036be575f3ef966..d2d0b966b20e238b77e28b8d8a0aeb55f81c4a97 100644 (file)
@@ -219,13 +219,6 @@ 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)) {
-               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);
-               Z_TYPE_INFO_P(zvalue) = IS_CONSTANT_EX;
        } else if (EXPECTED(Z_TYPE_P(zvalue) == IS_STRING) ||
                   EXPECTED(Z_TYPE_P(zvalue) == IS_CONSTANT)) {
                CHECK_ZVAL_STRING_REL(Z_STR_P(zvalue));