]> 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 5247f079a36942b55372d1522068e0b6638231b8..e3c27756be8337fee2bdeb5f6ef05ffd6ad62837 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,10 +9,12 @@ PHP                                                                        NEWS
   (Jani)
 - Fixed bug #50394 (Reference argument converted to value in __call). (Stas)
 - Fixed bug #49851 (http wrapper breaks on 1024 char long headers). (Ilia)
-- Fixed bug #45599 (strip_tags() truncates rest of string with invalid
-  attribute). (Ilia, hradtke)
+- Fixed bug #47409 (extract() problem with array containing word "this").
+  (Ilia, chrisstocktonaz at gmail dot com)
 - Fixed bug #47002 (Field truncation when reading from dbase dbs with more
   then 1024 fields). (Ilia, sjoerd-php at linuxonly dot nl)
+- Fixed bug #45599 (strip_tags() truncates rest of string with invalid
+  attribute). (Ilia, hradtke)  
 
 17 Dec 2009, PHP 5.2.12
 - Updated timezone database to version 2009.19 (2009s). (Derick)
index 2f9f3fb17f205e9fc3e017647a79230550ca641d..e89833da5f0dc982fb40c27918d3a90757c5c497 100644 (file)
@@ -1507,7 +1507,10 @@ PHP_FUNCTION(extract)
 
                        case EXTR_OVERWRITE:
                                /* GLOBALS protection */
-                               if (var_exists && !strcmp(var_name, "GLOBALS")) {
+                               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;
                                }
                                smart_str_appendl(&final_name, var_name, var_name_len);