summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schlüter <johannes@php.net>2014-07-24 16:59:37 +0200
committerJohannes Schlüter <johannes@php.net>2014-07-24 16:59:37 +0200
commit6fdbb4601f73fa254175897c3fc7b3fe995f9b7e (patch)
treead9dce7fc01444467827c965520ccddcbea3a0d5
parent4b410090645cf73278be790ab54644d24e611184 (diff)
parent210315d5a56d832123bd6b52dce33942f94c4a83 (diff)
downloadphp-git-6fdbb4601f73fa254175897c3fc7b3fe995f9b7e.tar.gz
Merge branch 'PHP-5.6'
-rw-r--r--ext/readline/readline_cli.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/readline/readline_cli.c b/ext/readline/readline_cli.c
index c2bf8764cb..9655777775 100644
--- a/ext/readline/readline_cli.c
+++ b/ext/readline/readline_cli.c
@@ -99,6 +99,9 @@ static size_t readline_shell_write(const char *str, uint str_length TSRMLS_DC) /
static int readline_shell_ub_write(const char *str, uint str_length TSRMLS_DC) /* {{{ */
{
+ /* We just store the last char here and then pass back to the
+ caller (sapi_cli_single_write in sapi/cli) which will actually
+ write due to -1 return code */
php_last_char = str[str_length-1];
return -1;
}
@@ -667,7 +670,7 @@ static int readline_shell_run(TSRMLS_D) /* {{{ */
pos = 0;
if (!pager_pipe && php_last_char != '\0' && php_last_char != '\n') {
- readline_shell_write("\n", 1 TSRMLS_CC);
+ php_write("\n", 1 TSRMLS_CC);
}
if (EG(exception)) {