From: Brion Vibber Date: Wed, 6 Jan 2010 21:08:56 +0000 (-0800) Subject: suppress notice for undefined prompt variable when console.php is used from non-inter... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6f5b765c97c8616e4a79719bfe835cb03dc0a236;p=quix0rs-gnu-social.git suppress notice for undefined prompt variable when console.php is used from non-interactive terminal --- 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);