]> granicus.if.org Git - php/commitdiff
Fix opcache return type for get_headers in zend_func_info
authorTyson Andre <tysonandre775@hotmail.com>
Fri, 13 Sep 2019 18:09:15 +0000 (14:09 -0400)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 17 Sep 2019 10:08:29 +0000 (12:08 +0200)
https://www.php.net/manual/en/function.get-headers.php#refsect1-function.get-headers-examples
shows that it will return string keys when the second argument is
non-zero. I've verified that this is the case.

This bug was there since the initial commit in c88ffa9a567.

Closes GH-4702.

ext/opcache/Optimizer/zend_func_info.c

index 919b4c3a34ea560ac49ce9ac1cbb97701c44bcac..496755d97ca03cbe844ea5a14cc3f88ad0063736 100644 (file)
@@ -685,7 +685,7 @@ static const func_info_t func_infos[] = {
        F1("stream_get_transports",        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
        F1("stream_resolve_include_path",  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
        F0("stream_is_local",              MAY_BE_FALSE | MAY_BE_TRUE),
-       F1("get_headers",                  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
+       F1("get_headers",                  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
 #if HAVE_SYS_TIME_H || defined(PHP_WIN32)
        F0("stream_set_timeout",           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
        F0("socket_set_timeout",           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),