Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@cmb69
Created July 21, 2018 12:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmb69/26076c5bac9a1429a03be3eaca65fe0c to your computer and use it in GitHub Desktop.
Save cmb69/26076c5bac9a1429a03be3eaca65fe0c to your computer and use it in GitHub Desktop.
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