From: Felipe Pena Date: Thu, 2 Oct 2008 03:30:54 +0000 (+0000) Subject: - Fixed bug #46215 (json_encode mutates its parameter and has some class-specific... X-Git-Tag: BEFORE_HEAD_NS_CHANGE~299 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=37e56d85387c04cef0e75855f5d7ccef740286da;p=php - Fixed bug #46215 (json_encode mutates its parameter and has some class-specific state) --- diff --git a/ext/json/json.c b/ext/json/json.c index 9f86daa004..1d19d20deb 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 || i == HASH_KEY_IS_UNICODE) { if (key.s[0] == '\0' && Z_TYPE_PP(val) == IS_OBJECT) { /* Skip protected and private members. */ + if (tmp_ht) { + tmp_ht->nApplyCount--; + } continue; }