fix the fix for #47409

use correct comparison and add missing scope checks to trunk
This commit is contained in:
Antony Dovgal 2009-12-24 13:07:33 +00:00
parent 139c26f795
commit c2fa809deb

View 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);