From 9badd4f0fb03a9ca22775cf80f115a7cb617453c Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Tue, 8 Jun 2010 13:27:30 +0000 Subject: [PATCH] fix bug #50101 (name clash between global and local variable) --- NEWS | 2 ++ TSRM/tsrm_virtual_cwd.c | 16 ++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/NEWS b/NEWS index 096131b227..d1247bbe76 100644 --- a/NEWS +++ b/NEWS @@ -171,6 +171,8 @@ PHP NEWS - Fixed bug #50383 (Exceptions thrown in __call / __callStatic do not include file and line in trace). (Felipe) - Fixed bug #50358 (Compile failure compiling ext/phar/util.lo). (Felipe) +- Fixed bug #50101 (name clash between global and local variable). + (patch by yoarvi at gmail dot com) - Fixed bug #49893 (Crash while creating an instance of Zend_Mail_Storage_Pop3). (Dmitry) - Fixed bug #49819 (STDOUT losing data with posix_isatty()). (Mike) diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c index 3ccc729fc6..d51e01aa3e 100644 --- a/TSRM/tsrm_virtual_cwd.c +++ b/TSRM/tsrm_virtual_cwd.c @@ -298,19 +298,19 @@ static int php_is_file_ok(const cwd_state *state) /* {{{ */ } /* }}} */ -static void cwd_globals_ctor(virtual_cwd_globals *cwd_globals TSRMLS_DC) /* {{{ */ +static void cwd_globals_ctor(virtual_cwd_globals *cwd_g TSRMLS_DC) /* {{{ */ { - CWD_STATE_COPY(&cwd_globals->cwd, &main_cwd_state); - cwd_globals->realpath_cache_size = 0; - cwd_globals->realpath_cache_size_limit = REALPATH_CACHE_SIZE; - cwd_globals->realpath_cache_ttl = REALPATH_CACHE_TTL; - memset(cwd_globals->realpath_cache, 0, sizeof(cwd_globals->realpath_cache)); + CWD_STATE_COPY(&cwd_g->cwd, &main_cwd_state); + cwd_g->realpath_cache_size = 0; + cwd_g->realpath_cache_size_limit = REALPATH_CACHE_SIZE; + cwd_g->realpath_cache_ttl = REALPATH_CACHE_TTL; + memset(cwd_g->realpath_cache, 0, sizeof(cwd_g->realpath_cache)); } /* }}} */ -static void cwd_globals_dtor(virtual_cwd_globals *cwd_globals TSRMLS_DC) /* {{{ */ +static void cwd_globals_dtor(virtual_cwd_globals *cwd_g TSRMLS_DC) /* {{{ */ { - CWD_STATE_FREE(&cwd_globals->cwd); + CWD_STATE_FREE(&cwd_g->cwd); realpath_cache_clean(TSRMLS_C); } /* }}} */ -- 2.40.0