diff options
-rw-r--r-- | NEWS | 14 | ||||
-rw-r--r-- | main/getopt.c | 8 |
2 files changed, 16 insertions, 6 deletions
@@ -3,17 +3,19 @@ PHP NEWS ?? ??? 2014, PHP 5.6.3 - Core: - . Fixed bug #67739 (Windows 8.1/Server 2012 R2 OS build number reported - as 6.2 (instead of 6.3)). (Christian Wenz) + . Implemented 64-bit format codes for pack() and unpack(). (Leigh) + . Fixed bug #51800 (proc_open on Windows hangs forever). (Anatol) . Fixed bug #67633 (A foreach on an array returned from a function not doing copy-on-write). (Nikita) - . Fixed bug #51800 (proc_open on Windows hangs forever). (Anatol) + . Fixed bug #67739 (Windows 8.1/Server 2012 R2 OS build number reported + as 6.2 (instead of 6.3)). (Christian Wenz) + . Fixed bug #67949 (DOMNodeList elements should be accessible through + array notation) (Florian) + . Fixed bug #68095 (AddressSanitizer reports a heap buffer overflow in + php_getopt()). (Stas) . Fixed bug #68118 ($a->foo .= 'test'; can leave $a->foo undefined). (Nikita) . Fixed bug #68129 (parse_url() - incomplete support for empty usernames and passwords) (Tjerk) - . Fixed bug #67949 (DOMNodeList elements should be accessible through - array notation) (Florian) - . Implemented 64-bit format codes for pack() and unpack(). (Leigh) - phpdbg: . Added XML protocol (-x command line flag). (Bob) diff --git a/main/getopt.c b/main/getopt.c index a31a6c75d5..258173fc22 100644 --- a/main/getopt.c +++ b/main/getopt.c @@ -59,9 +59,17 @@ PHPAPI int php_getopt(int argc, char* const *argv, const opt_struct opts[], char { static int optchr = 0; static int dash = 0; /* have already seen the - */ + static char **prev_optarg = NULL; php_optidx = -1; + if(prev_optarg && prev_optarg != optarg) { + /* reset the state */ + optchr = 0; + dash = 0; + } + prev_optarg = optarg; + if (*optind >= argc) { return(EOF); } |