diff options
Diffstat (limited to 'ext/json/json_parser.y')
| -rw-r--r-- | ext/json/json_parser.y | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/ext/json/json_parser.y b/ext/json/json_parser.y index ba7311c963..2f8a260c98 100644 --- a/ext/json/json_parser.y +++ b/ext/json/json_parser.y @@ -1,8 +1,6 @@ %code top { /* +----------------------------------------------------------------------+ - | PHP Version 7 | - +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | @@ -245,7 +243,6 @@ static int php_json_parser_object_update(php_json_parser *parser, zval *object, if (Z_TYPE_P(object) == IS_ARRAY) { zend_symtable_update(Z_ARRVAL_P(object), key, zvalue); } else { - zval zkey; if (ZSTR_LEN(key) > 0 && ZSTR_VAL(key)[0] == '\0') { parser->scanner.errcode = PHP_JSON_ERROR_INVALID_PROPERTY_NAME; zend_string_release_ex(key, 0); @@ -253,8 +250,7 @@ static int php_json_parser_object_update(php_json_parser *parser, zval *object, zval_ptr_dtor_nogc(object); return FAILURE; } - ZVAL_NEW_STR(&zkey, key); - zend_std_write_property(object, &zkey, zvalue, NULL); + zend_std_write_property(Z_OBJ_P(object), key, zvalue, NULL); Z_TRY_DELREF_P(zvalue); } zend_string_release_ex(key, 0); |
