From: Brian France Date: Thu, 23 Feb 2006 03:51:46 +0000 (+0000) Subject: MFH: fixed bug #35594 for all systems. "optind = 0" doesn't work on FreeBSD, but... X-Git-Tag: php-5.1.3RC1~81 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9f53c8e313fb92d9b53b6da1689c84f1628ea947;p=php MFH: fixed bug #35594 for all systems. "optind = 0" doesn't work on FreeBSD, but "optind = 1" seems to work on all systems (bug #36091) --- diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 2ff5bb83f6..bcccc61c31 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -1667,7 +1667,7 @@ PHP_FUNCTION(getopt) opterr = 0; /* Force reinitialization of getopt() (via optind reset) on every call. */ - optind = 0; + optind = 1; /* Invoke getopt(3) on the argument array. */ #ifdef HARTMUT_0