From e5fb0e3fbde27d068553c6eb92f4326a2b84bed2 Mon Sep 17 00:00:00 2001 From: Moriyoshi Koizumi Date: Thu, 4 Mar 2004 22:49:54 +0000 Subject: [PATCH] - Prevent cli from printing multiple "Interactive mode enabled" if the command line option is given more than once (like -aaaaaa). --- sapi/cli/php_cli.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 76c71881b5..0a1a447d70 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -714,9 +714,11 @@ int main(int argc, char *argv[]) switch (c) { case 'a': /* interactive mode */ - printf("Interactive mode enabled\n\n"); - fflush(stdout); - interactive=1; + if (interactive) { + printf("Interactive mode enabled\n\n"); + fflush(stdout); + interactive=1; + } break; case 'C': /* don't chdir to the script directory */ -- 2.40.0