dmitry Wed Apr 9 09:17:02 2008 UTC
Modified files:
/php-src/sapi/cgi cgi_main.c
Log:
Fixed bug #44673 (With CGI argv/argc starts from arguments, not from script)
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.353&r2=1.354&diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.353 php-src/sapi/cgi/cgi_main.c:1.354
--- php-src/sapi/cgi/cgi_main.c:1.353 Wed Mar 26 14:46:17 2008
+++ php-src/sapi/cgi/cgi_main.c Wed Apr 9 09:17:01 2008
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: cgi_main.c,v 1.353 2008/03/26 14:46:17 scottmac Exp $ */
+/* $Id: cgi_main.c,v 1.354 2008/04/09 09:17:01 dmitry Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -1805,7 +1805,7 @@
} 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];
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php