Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Potential fix for https://bugs.php.net/76643
ext/standard/url_scanner_ex.re | 1 +
1 file changed, 1 insertion(+)
diff --git a/ext/standard/url_scanner_ex.re b/ext/standard/url_scanner_ex.re
index f54cdfc907..8182b459c8 100644
--- a/ext/standard/url_scanner_ex.re
+++ b/ext/standard/url_scanner_ex.re
@@ -359,6 +359,7 @@ static int check_http_host(char *target)
char *colon;
if ((tmp = zend_hash_str_find(&EG(symbol_table), ZEND_STRL("_SERVER"))) &&
+ Z_TYPE_P(tmp) == IS_ARRAY &&
(host = zend_hash_str_find(Z_ARRVAL_P(tmp), ZEND_STRL("HTTP_HOST"))) &&
Z_TYPE_P(host) == IS_STRING) {
host_tmp = zend_string_init(Z_STRVAL_P(host), Z_STRLEN_P(host), 0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment