]> granicus.if.org Git - php/commitdiff
Fixed bug #44673 (With CGI argv/argc starts from arguments, not from script)
authorDmitry Stogov <dmitry@php.net>
Wed, 9 Apr 2008 09:16:51 +0000 (09:16 +0000)
committerDmitry Stogov <dmitry@php.net>
Wed, 9 Apr 2008 09:16:51 +0000 (09:16 +0000)
sapi/cgi/cgi_main.c

index 5e48ac9bf767cc3260485a6ccf82089eb53694ee..0c7cc011975e52f6e07575ab920ea465f09fc3e4 100644 (file)
@@ -1800,7 +1800,7 @@ consult the installation file that came with this distribution, or visit \n\
                                } else if (argc > php_optind) {
                                        /* file is on command line, but not in -f opt */
                                        STR_FREE(SG(request_info).path_translated);
-                                       SG(request_info).path_translated = estrdup(argv[php_optind++]);
+                                       SG(request_info).path_translated = estrdup(argv[php_optind]);
                                        /* arguments after the file are considered script args */
                                        SG(request_info).argc = argc - php_optind;
                                        SG(request_info).argv = &argv[php_optind];