From: Johannes Schlüter Date: Wed, 20 Jan 2010 16:07:10 +0000 (+0000) Subject: Merge 292549: Fixed bug #47409 (extract() problem with array containing word X-Git-Tag: php-5.3.2RC2~116 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=92b59f81d0b12004b7cae119853cf8bffb43044b;p=php Merge 292549: Fixed bug #47409 (extract() problem with array containing word "this"). (iliaa) --- diff --git a/NEWS b/NEWS index ab35a77708..b45719fa0a 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 20??, PHP 5.3.2 RC 2 +- Fixed bug #47409 (extract() problem with array containing word "this"). + (Ilia, chrisstocktonaz at gmail dot com) 22 Dec 2009, PHP 5.3.2 RC 1 diff --git a/ext/standard/array.c b/ext/standard/array.c index 70a47477dc..2d29984da6 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -1383,6 +1383,9 @@ PHP_FUNCTION(extract) if (var_exists && var_name_len == sizeof("GLOBALS") && !strcmp(var_name, "GLOBALS")) { break; } + if (var_exists && var_name_len == sizeof("this") && !strcmp(var_name, "this") && EG(scope) && "" != EG(scope)->name) { + break; + } ZVAL_STRINGL(&final_name, var_name, var_name_len, 1); break;