summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_out.c
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/phpdbg/phpdbg_out.c')
-rw-r--r--sapi/phpdbg/phpdbg_out.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sapi/phpdbg/phpdbg_out.c b/sapi/phpdbg/phpdbg_out.c
index 3fa421ad33..cd9a4acaa0 100644
--- a/sapi/phpdbg/phpdbg_out.c
+++ b/sapi/phpdbg/phpdbg_out.c
@@ -1032,8 +1032,8 @@ static int phpdbg_process_print(int fd, int type, const char *tag, const char *m
PHPDBG_G(in_script_xml) = type;
}
encoded = php_escape_html_entities((unsigned char *) msg, msglen, 0, ENT_NOQUOTES, PG(internal_encoding) && PG(internal_encoding)[0] ? PG(internal_encoding) : (SG(default_charset) ? SG(default_charset) : "UTF-8"));
- buflen = encoded->len;
- memcpy(buf = emalloc(buflen + 1), encoded->val, buflen);
+ buflen = ZSTR_LEN(encoded);
+ memcpy(buf = emalloc(buflen + 1), ZSTR_VAL(encoded), buflen);
phpdbg_encode_ctrl_chars(&buf, &buflen);
phpdbg_mixed_write(fd, buf, buflen);
efree(buf);