From: Moriyoshi Koizumi Date: Thu, 4 Mar 2004 22:49:54 +0000 (+0000) Subject: - Prevent cli from printing multiple "Interactive mode enabled" if X-Git-Tag: RELEASE_0_2_0~51 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e5fb0e3fbde27d068553c6eb92f4326a2b84bed2;p=php - Prevent cli from printing multiple "Interactive mode enabled" if the command line option is given more than once (like -aaaaaa). --- 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 */