Skip to content

Commit ffc1d25

Browse files
committed
Merge branch 'PHP-5.4' into PHP-5.5
2 parents 6fcd8e5 + 71d3a69 commit ffc1d25

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ext/readline/readline_cli.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ static size_t readline_shell_write(const char *str, uint str_length TSRMLS_DC) /
9999

100100
static int readline_shell_ub_write(const char *str, uint str_length TSRMLS_DC) /* {{{ */
101101
{
102+
/* We just store the last char here and then pass back to the
103+
caller (sapi_cli_single_write in sapi/cli) which will actually
104+
write due to -1 return code */
102105
php_last_char = str[str_length-1];
103106
return -1;
104107
}
@@ -667,7 +670,7 @@ static int readline_shell_run(TSRMLS_D) /* {{{ */
667670
pos = 0;
668671

669672
if (!pager_pipe && php_last_char != '\0' && php_last_char != '\n') {
670-
readline_shell_write("\n", 1 TSRMLS_CC);
673+
php_write("\n", 1 TSRMLS_CC);
671674
}
672675

673676
if (EG(exception)) {

0 commit comments

Comments
 (0)