summaryrefslogtreecommitdiff
path: root/ext/json/json.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2011-10-17 23:51:25 +0000
committerIlia Alshanetsky <iliaa@php.net>2011-10-17 23:51:25 +0000
commit65732af7da2a32bf43c1a0918a6725c4c333182d (patch)
tree773119b866346e47d5eefa87bda2baf6dc442ea8 /ext/json/json.c
parent077519d3fbe3aca87f392993c81f526ef2c6b635 (diff)
downloadphp-git-65732af7da2a32bf43c1a0918a6725c4c333182d.tar.gz
Fixed bug #55543 (json_encode() with JSON_NUMERIC_CHECK fails on objects with numeric string properties)
Diffstat (limited to 'ext/json/json.c')
-rw-r--r--ext/json/json.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/json/json.c b/ext/json/json.c
index 3c20498aa8..c7759ed740 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -297,7 +297,7 @@ static void json_encode_array(smart_str *buf, zval **val, int options TSRMLS_DC)
json_pretty_print_indent(buf, options TSRMLS_CC);
- json_escape_string(buf, key, key_len - 1, options TSRMLS_CC);
+ json_escape_string(buf, key, key_len - 1, options & ~PHP_JSON_NUMERIC_CHECK TSRMLS_CC);
smart_str_appendc(buf, ':');
json_pretty_print_char(buf, options, ' ' TSRMLS_CC);