]> granicus.if.org Git - php/commitdiff
allow other modes to work with -- correct
authorMarcus Boerger <helly@php.net>
Tue, 26 Mar 2002 14:43:57 +0000 (14:43 +0000)
committerMarcus Boerger <helly@php.net>
Tue, 26 Mar 2002 14:43:57 +0000 (14:43 +0000)
#original idea was to allow this *only* for PHP_MODE_STANDARD

sapi/cli/php_cli.c

index 7a0bf11aeac51eef60bb136dc870a284a395d8ea..17522d4cf52c13f14352a6c7ed7868326338c669 100644 (file)
@@ -554,7 +554,7 @@ int main(int argc, char *argv[])
                CG(interactive) = interactive;
 
                /* only set script_file if not set already and not in direct mode and not at end of parameter list */
-               if (argc > ap_php_optind && !script_file && behavior==PHP_MODE_STANDARD && !strcmp(argv[ap_php_optind-1],"--")) {
+               if (argc > ap_php_optind && !script_file && behavior!=PHP_MODE_CLI_DIRECT && !strcmp(argv[ap_php_optind-1],"--")) {
                        no_headers = 1;
                        script_file=argv[ap_php_optind];
                        ap_php_optind++;