From 6f5b765c97c8616e4a79719bfe835cb03dc0a236 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 6 Jan 2010 13:08:56 -0800 Subject: [PATCH] suppress notice for undefined prompt variable when console.php is used from non-interactive terminal --- scripts/console.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/console.php b/scripts/console.php index 329caf4724..8b62a3a967 100755 --- a/scripts/console.php +++ b/scripts/console.php @@ -128,6 +128,8 @@ function console_help() if (CONSOLE_INTERACTIVE) { print "StatusNet interactive PHP console... type ctrl+D or enter 'exit' to exit.\n"; $prompt = common_config('site', 'name') . '> '; +} else { + $prompt = ''; } while (!feof(STDIN)) { $line = read_input_line($prompt); -- 2.39.5