X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=scripts%2Fconsole.php;h=c260ffaa0037cb41dc5942deae59589f5c8526b3;hb=cb3d8636680320efb998ac303fe55e775ae75b97;hp=8b62a3a96783d7a7442326f33007d4f859e8d4f3;hpb=e53512cd2c2180f81fc7317de9df09a140099aa3;p=quix0rs-gnu-social.git diff --git a/scripts/console.php b/scripts/console.php index 8b62a3a967..c260ffaa00 100755 --- a/scripts/console.php +++ b/scripts/console.php @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -# Abort if called from a web server +// Abort if called from a web server define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); @@ -45,10 +45,12 @@ function read_input_line($prompt) if (CONSOLE_INTERACTIVE) { if (CONSOLE_READLINE) { $line = readline($prompt); - readline_add_history($line); - if (defined('CONSOLE_HISTORY')) { - // Save often; it's easy to hit fatal errors. - readline_write_history(CONSOLE_HISTORY); + if (trim($line) != '') { + readline_add_history($line); + if (defined('CONSOLE_HISTORY')) { + // Save often; it's easy to hit fatal errors. + readline_write_history(CONSOLE_HISTORY); + } } return $line; } else {