]> granicus.if.org Git - php/commitdiff
fix the fix for #47409
authorAntony Dovgal <tony2001@php.net>
Thu, 24 Dec 2009 13:07:33 +0000 (13:07 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 24 Dec 2009 13:07:33 +0000 (13:07 +0000)
use correct comparison and add missing scope checks to trunk

ext/standard/array.c

index 1c78cab2e8cdd5bb3ab8795dc77232a810f07af2..5ed0862abb5962943bce29378ae09637bea303a3 100644 (file)
@@ -1445,7 +1445,7 @@ PHP_FUNCTION(extract)
                                if (var_exists && var_name_len == sizeof("GLOBALS") && ZEND_U_EQUAL(key_type, var_name, var_name_len - 1, "GLOBALS", sizeof("GLOBALS") - 1)) {
                                        break;
                                }
-                               if (var_exists && var_name_len == sizeof("this") && ZEND_U_EQUAL(key_type, var_name, var_name_len - 1, "this", sizeof("this") - 1)) {
+                               if (var_exists && var_name_len == sizeof("this") && ZEND_U_EQUAL(key_type, var_name, var_name_len - 1, "this", sizeof("this") - 1) && EG(scope) && EG(scope)->name_length != 0) {
                                        break;
                                }
                                ZVAL_ZSTRL(&final_name, key_type, var_name, var_name_len, 1);