diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-06-05 16:04:11 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-06-05 16:04:11 +0400 |
commit | c1965f58d4dd3970912dcd6a63ccd5860bae1a97 (patch) | |
tree | 15b4a94e8e8405f791438c468ad4eb03f60c4079 /ext/json/json.c | |
parent | 3d87391cc06fe87344536e88ac74ded22b0195cf (diff) | |
download | php-git-c1965f58d4dd3970912dcd6a63ccd5860bae1a97.tar.gz |
Use reference counting instead of zval duplication
Diffstat (limited to 'ext/json/json.c')
-rw-r--r-- | ext/json/json.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/json/json.c b/ext/json/json.c index e7e07ce2c1..0bf8a645e6 100644 --- a/ext/json/json.c +++ b/ext/json/json.c @@ -276,7 +276,7 @@ static void json_encode_array(smart_str *buf, zval *val, int options TSRMLS_DC) if (key) { if (key->val[0] == '\0' && Z_TYPE_P(val) == IS_OBJECT) { /* Skip protected and private members. */ - if (tmp_ht) { + if (tmp_ht && ZEND_HASH_APPLY_PROTECTION(tmp_ht)) { ZEND_HASH_DEC_APPLY_COUNT(tmp_ht); } continue; |