diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2014-10-28 23:00:10 +0100 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2014-10-28 23:00:10 +0100 |
commit | 66aead4b5f48e3496582d48474a3f4c3864cfe1d (patch) | |
tree | cb2a94da79b5fa5d1262400bdefd8726a6b5ddea /sapi/phpdbg/phpdbg_webdata_transfer.c | |
parent | 9afb17868c3e853fb33e4500740328283c9c3057 (diff) | |
parent | be5d38976807c0e16c04fc53192ddab89d946a90 (diff) | |
download | php-git-66aead4b5f48e3496582d48474a3f4c3864cfe1d.tar.gz |
Merge remote-tracking branch 'origin/PHP-5.6'
Conflicts:
sapi/phpdbg/phpdbg_wait.c
sapi/phpdbg/phpdbg_webdata_transfer.c
Diffstat (limited to 'sapi/phpdbg/phpdbg_webdata_transfer.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_webdata_transfer.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/sapi/phpdbg/phpdbg_webdata_transfer.c b/sapi/phpdbg/phpdbg_webdata_transfer.c index 2f18b9d082..5ce6759062 100644 --- a/sapi/phpdbg/phpdbg_webdata_transfer.c +++ b/sapi/phpdbg/phpdbg_webdata_transfer.c @@ -17,7 +17,7 @@ */ #include "phpdbg_webdata_transfer.h" -#include "ext/json/php_json.h" +#include "ext/standard/php_var.h" static int phpdbg_is_auto_global(char *name, int len TSRMLS_DC) { int ret; @@ -28,8 +28,6 @@ static int phpdbg_is_auto_global(char *name, int len TSRMLS_DC) { } PHPDBG_API void phpdbg_webdata_compress(char **msg, int *len TSRMLS_DC) { -#ifdef HAVE_JSON - smart_str buf = {0}; zval array; HashTable *ht; zval zv[9] = {{{0}}}; @@ -162,9 +160,16 @@ PHPDBG_API void phpdbg_webdata_compress(char **msg, int *len TSRMLS_DC) { } /* encode data */ - php_json_encode(&buf, &array, 0 TSRMLS_CC); - *msg = buf.s->val; - *len = buf.s->len; + { + php_serialize_data_t var_hash; + smart_str buf = {0}; + + PHP_VAR_SERIALIZE_INIT(var_hash); + php_var_serialize(&buf, &array, &var_hash TSRMLS_CC); + PHP_VAR_SERIALIZE_DESTROY(var_hash); + *msg = buf.s->val; + *len = buf.s->len; + } + zval_dtor(&array); -#endif } |