]> granicus.if.org Git - php/commitdiff
Fixed bug #47409 (extract() problem with array containing word "this").
authorIlia Alshanetsky <iliaa@php.net>
Wed, 23 Dec 2009 16:33:58 +0000 (16:33 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 23 Dec 2009 16:33:58 +0000 (16:33 +0000)
NEWS
ext/standard/array.c

diff --git a/NEWS b/NEWS
index 6fd88eef7385fd0401c3c0b2ecbe5742c194a2b8..bf5aba5db3a69113a48d20fd92b40f77527fdfb2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,8 @@
 PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 20??, PHP 5.3.3
+- Fixed bug #47409 (extract() problem with array containing word "this").
+  (Ilia, chrisstocktonaz at gmail dot com)
 
 ?? ??? 20??, PHP 5.3.2
 - Upgraded bundled sqlite to version 3.6.21. (Ilia)
index c6b21c73d18e1d1afa19a6be339aa30ff3567037..3c16d77f3c4b06ea814c5d73e5fb3bcbd3867811 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;