From f0b50963e5e526e81bd488d94152c81a6033dfaa Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Mon, 20 Jul 2015 21:57:00 +0200 Subject: Do not use readline when not having a tty This is important for e.g. run-tests.php --- sapi/phpdbg/phpdbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sapi/phpdbg/phpdbg.c') diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index 3fdc7cbe30..d594601f29 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -564,7 +564,7 @@ static PHP_FUNCTION(phpdbg_end_oplog) last_function = op_array->function_name; last_scope = op_array->scope; if (last_scope == NULL) { - fn_name = zend_string_copy(last_function ? last_function : last_file); + fn_name = zend_string_copy(last_function); } 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)); } -- cgit v1.2.1