]> granicus.if.org Git - php/commitdiff
Merge 292549: Fixed bug #47409 (extract() problem with array containing word
authorJohannes Schlüter <johannes@php.net>
Wed, 20 Jan 2010 16:07:10 +0000 (16:07 +0000)
committerJohannes Schlüter <johannes@php.net>
Wed, 20 Jan 2010 16:07:10 +0000 (16:07 +0000)
"this"). (iliaa)

NEWS
ext/standard/array.c

diff --git a/NEWS b/NEWS
index ab35a777081051aedab665adc86207f0b554168c..b45719fa0a3f460202ca4302cbb0956ffc969e62 100644 (file)
--- 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
index 70a47477dc9ea9e0e4c0cffc53ed7eeb1e95b3ad..2d29984da6ff42d821484d80ae0753845bdcb3cc 100644 (file)
@@ -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;