mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Do not use readline when not having a tty
This is important for e.g. run-tests.php
This commit is contained in:
parent
6aadeba213
commit
f0b50963e5
2 changed files with 2 additions and 2 deletions
|
@ -564,7 +564,7 @@ static PHP_FUNCTION(phpdbg_end_oplog)
|
||||||
last_function = op_array->function_name;
|
last_function = op_array->function_name;
|
||||||
last_scope = op_array->scope;
|
last_scope = op_array->scope;
|
||||||
if (last_scope == NULL) {
|
if (last_scope == NULL) {
|
||||||
fn_name = zend_string_copy(last_function ? last_function : last_file);
|
fn_name = zend_string_copy(last_function);
|
||||||
} else {
|
} else {
|
||||||
fn_name = strpprintf(ZSTR_LEN(last_function) + ZSTR_LEN(last_scope->name) + 2, "%.*s::%.*s", ZSTR_LEN(last_scope->name), ZSTR_VAL(last_scope->name), ZSTR_LEN(last_function), ZSTR_VAL(last_function));
|
fn_name = strpprintf(ZSTR_LEN(last_function) + ZSTR_LEN(last_scope->name) + 2, "%.*s::%.*s", ZSTR_LEN(last_scope->name), ZSTR_VAL(last_scope->name), ZSTR_LEN(last_function), ZSTR_VAL(last_function));
|
||||||
}
|
}
|
||||||
|
|
|
@ -716,7 +716,7 @@ PHPDBG_API char *phpdbg_read_input(char *buffered) /* {{{ */
|
||||||
#define USE_LIB_STAR (defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT))
|
#define USE_LIB_STAR (defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT))
|
||||||
/* note: EOF makes readline write prompt again in local console mode - and ignored if compiled without readline */
|
/* note: EOF makes readline write prompt again in local console mode - and ignored if compiled without readline */
|
||||||
#if USE_LIB_STAR
|
#if USE_LIB_STAR
|
||||||
if (PHPDBG_G(flags) & PHPDBG_IS_REMOTE)
|
if ((PHPDBG_G(flags) & PHPDBG_IS_REMOTE) || !isatty(PHPDBG_G(io)[PHPDBG_STDOUT].fd))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
phpdbg_write("prompt", "", "%s", phpdbg_get_prompt());
|
phpdbg_write("prompt", "", "%s", phpdbg_get_prompt());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue