use correct comparison and add missing scope checks to trunk
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) {
+ if (var_exists && var_name_len == sizeof("this") && !strcmp(var_name, "this") && EG(scope) && EG(scope)->name_length != 0) {
break;
}
ZVAL_STRINGL(&final_name, var_name, var_name_len, 1);