summaryrefslogtreecommitdiff
path: root/ext/json/json_parser.tab.c
diff options
context:
space:
mode:
authorAaron Piotrowski <aaron@trowski.com>2016-07-03 22:42:10 -0500
committerAaron Piotrowski <aaron@trowski.com>2016-07-03 22:42:10 -0500
commitd9a9cf8ecaef891b2369969e9efe9f6261359158 (patch)
tree04bcc83b3c9be1924007e007e1f508f7229af7ab /ext/json/json_parser.tab.c
parent583386d59e6b362fe49e51594718a109d0c0cc2f (diff)
parentc2b29a58bc0916e248ba2584564558097b16b51f (diff)
downloadphp-git-d9a9cf8ecaef891b2369969e9efe9f6261359158.tar.gz
Merge branch 'master' into iterable
Diffstat (limited to 'ext/json/json_parser.tab.c')
-rw-r--r--ext/json/json_parser.tab.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/ext/json/json_parser.tab.c b/ext/json/json_parser.tab.c
index 02002d681b..b4f426e07a 100644
--- a/ext/json/json_parser.tab.c
+++ b/ext/json/json_parser.tab.c
@@ -139,8 +139,8 @@ int json_yydebug = 1;
/* In a future release of Bison, this section will be replaced
by #include "json_parser.tab.h". */
-#ifndef YY_PHP_JSON_YY_HOME_JAKUB_PROG_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED
-# define YY_PHP_JSON_YY_HOME_JAKUB_PROG_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED
+#ifndef YY_PHP_JSON_YY_HOME_DMITRY_PHP_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED
+# define YY_PHP_JSON_YY_HOME_DMITRY_PHP_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
@@ -201,7 +201,7 @@ typedef union YYSTYPE YYSTYPE;
int php_json_yyparse (php_json_parser *parser);
-#endif /* !YY_PHP_JSON_YY_HOME_JAKUB_PROG_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED */
+#endif /* !YY_PHP_JSON_YY_HOME_DMITRY_PHP_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED */
/* Copy the second part of user declarations. */
@@ -1881,10 +1881,7 @@ static int php_json_parser_object_update(php_json_parser *parser, zval *object,
zend_symtable_update(Z_ARRVAL_P(object), key, zvalue);
} else {
zval zkey;
- if (ZSTR_LEN(key) == 0) {
- zend_string_release(key);
- key = zend_string_init("_empty_", sizeof("_empty_") - 1, 0);
- } else if (ZSTR_VAL(key)[0] == '\0') {
+ if (ZSTR_LEN(key) > 0 && ZSTR_VAL(key)[0] == '\0') {
parser->scanner.errcode = PHP_JSON_ERROR_INVALID_PROPERTY_NAME;
zend_string_release(key);
zval_dtor(zvalue);