summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_webdata_transfer.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-11-18 21:18:52 +0100
committerAnatol Belski <ab@php.net>2014-11-18 21:18:52 +0100
commitc6bad96f306df8e8b656472e618283ced5083cdb (patch)
tree7e5b52aa07777f0336b0944a228bf66f8f56b31f /sapi/phpdbg/phpdbg_webdata_transfer.c
parent4262663e4caa82ba17666781a95bdcb872b4e109 (diff)
parent64a39dc7b07d4b54d050a3a5c15045fe91c0b651 (diff)
downloadphp-git-c6bad96f306df8e8b656472e618283ced5083cdb.tar.gz
Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (398 commits) NEWS add test for bug #68381 Fixed bug #68381 Set FPM log level earlier during init proper dllexport move to size_t where zend_string is used internally fix some datatype mismatches return after the warning, to fix uninitialized salt usage fix datatype mismatches add missing type specifier fix datatype mismatches fix unsigned check "extern" shouldn't be used for definitions joined identical conditional blocks simplify fpm tests SEND_VAR_NO_REF optimization Add test for bug #68442 Add various tests for FPM - covering recent bugs (68420, 68421, 68423, 68428) - for UDS - for ping and status URI - for multi pool and multi mode Include small MIT FastCGI client library from https://github.com/adoy/PHP-FastCGI-Client Get rid of zend_free_op structure (use zval* instead). Get rid of useless TSRMLS arguments. Add new FPM test for IPv4/IPv6 ... Conflicts: win32/build/config.w32
Diffstat (limited to 'sapi/phpdbg/phpdbg_webdata_transfer.c')
-rw-r--r--sapi/phpdbg/phpdbg_webdata_transfer.c19
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
}