From: Brian France Date: Thu, 23 Feb 2006 03:53:00 +0000 (+0000) Subject: MFH: fixed bug #35594 for all systems. "optind = 0" doesn't work on FreeBSD, but... X-Git-Tag: php-4.4.3RC1~52 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d7cd8d390915876106b3ee0ff266195a18500cdf;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 87f64da232..9f5b24fe8b 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -1596,7 +1596,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