diff options
Diffstat (limited to 'sapi/cli/php_cli.c')
-rw-r--r-- | sapi/cli/php_cli.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index a0b9cfaaa2..6fe4922e73 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -213,6 +213,9 @@ static int sapi_cli_ub_write(const char *str, uint str_length TSRMLS_DC) size_t ret; #if HAVE_LIBREADLINE || HAVE_LIBEDIT + if (!str_length) { + return 0; + } php_last_char = str[str_length-1]; #endif |