From e3cd0709dbc7aecdc9dbc2747942f76df4ca76b5 Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Sat, 18 Jul 2015 23:36:37 +0200 Subject: [PATCH] Do never clean stdin buffer away --- sapi/phpdbg/phpdbg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index ffd0fa5bd1..c0f5253c00 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -711,6 +711,8 @@ static int php_sapi_phpdbg_deactivate(void) /* {{{ */ pg->prompt[1] = PHPDBG_G(prompt)[1]; memcpy(pg->colors, PHPDBG_G(colors), sizeof(pg->colors)); pg->eol = PHPDBG_G(eol); + pg->input_buflen = PHPDBG_G(input_buflen); + memcpy(pg->input_buffer, PHPDBG_G(input_buffer), pg->input_buflen); pg->flags = PHPDBG_G(flags) & PHPDBG_PRESERVE_FLAGS_MASK; } -- 2.40.0