]> granicus.if.org Git - php/commitdiff
- Prevent cli from printing multiple "Interactive mode enabled" if
authorMoriyoshi Koizumi <moriyoshi@php.net>
Thu, 4 Mar 2004 22:49:54 +0000 (22:49 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Thu, 4 Mar 2004 22:49:54 +0000 (22:49 +0000)
  the command line option is given more than once (like -aaaaaa).

sapi/cli/php_cli.c

index 76c71881b540f516c04648ebd15cede50be4819e..0a1a447d708b7ee077073be78af87e5104e640dd 100644 (file)
@@ -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 */