diff options
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; |