diff options
author | Felipe Pena <felipe@php.net> | 2008-10-02 03:36:20 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2008-10-02 03:36:20 +0000 |
commit | 604c7f6ad23019d59347ecc2a009681748fc541f (patch) | |
tree | aa22859ccc414db92db97574312261add76bf73a /ext/json/json.c | |
parent | 80720205c022fc670655c0565e0808bc7aae6129 (diff) | |
download | php-git-604c7f6ad23019d59347ecc2a009681748fc541f.tar.gz |
- MFH: Fixed bug #46215 (json_encode mutates its parameter and has some class-specific state)
Diffstat (limited to 'ext/json/json.c')
-rw-r--r-- | ext/json/json.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/json/json.c b/ext/json/json.c index c130105ae8..0e3a023251 100644 --- a/ext/json/json.c +++ b/ext/json/json.c @@ -211,6 +211,9 @@ static void json_encode_array(smart_str *buf, zval **val, int options TSRMLS_DC) if (i == HASH_KEY_IS_STRING) { if (key[0] == '\0' && Z_TYPE_PP(val) == IS_OBJECT) { /* Skip protected and private members. */ + if (tmp_ht) { + tmp_ht->nApplyCount--; + } continue; } |