From 872028de20b91e25428205f49fc036a09d4b001d Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Sat, 20 Aug 2016 22:39:14 +0200 Subject: fix TS issues with url rewrite globals --- ext/standard/basic_functions.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ext/standard/basic_functions.c') diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index ef628cc6cb..5463665a09 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -3484,6 +3484,12 @@ static void basic_globals_ctor(php_basic_globals *basic_globals_p) /* {{{ */ memset(&BG(url_adapt_session_ex), 0, sizeof(BG(url_adapt_session_ex))); memset(&BG(url_adapt_output_ex), 0, sizeof(BG(url_adapt_output_ex))); + BG(url_adapt_session_ex).type = 1; + BG(url_adapt_output_ex).type = 0; + + zend_hash_init(&BG(url_adapt_session_hosts_ht), 0, NULL, NULL, 1); + zend_hash_init(&BG(url_adapt_output_hosts_ht), 0, NULL, NULL, 1); + #if defined(_REENTRANT) && defined(HAVE_MBRLEN) && defined(HAVE_MBSTATE_T) memset(&BG(mblen_state), 0, sizeof(BG(mblen_state))); #endif @@ -3504,6 +3510,9 @@ static void basic_globals_dtor(php_basic_globals *basic_globals_p) /* {{{ */ zend_hash_destroy(basic_globals_p->url_adapt_output_ex.tags); free(basic_globals_p->url_adapt_output_ex.tags); } + + zend_hash_destroy(&basic_globals_p->url_adapt_session_hosts_ht); + zend_hash_destroy(&basic_globals_p->url_adapt_output_hosts_ht); } /* }}} */ -- cgit v1.2.1