Fixed foreach() over object properties

This commit is contained in:
Dmitry Stogov 2014-02-25 17:56:03 +04:00
parent fdd1f74e37
commit 4fd84823f6
2 changed files with 12 additions and 12 deletions

View File

@ -4357,12 +4357,12 @@ ZEND_VM_HANDLER(78, ZEND_FE_FETCH, VAR, ANY)
if (key_type == HASH_KEY_IS_LONG) {
ZVAL_LONG(key, int_key);
} else {
//??? const char *class_name, *prop_name;
//??? int prop_name_len;
//??? zend_unmangle_property_name_ex(
//??? str_key, &class_name, &prop_name, &prop_name_len
//??? );
//??? ZVAL_STRINGL(key, prop_name, prop_name_len, 1);
const char *class_name, *prop_name;
int prop_name_len;
zend_unmangle_property_name_ex(
str_key->val, str_key->len, &class_name, &prop_name, &prop_name_len
);
ZVAL_STRINGL(key, prop_name, prop_name_len);
}
}

View File

@ -13276,12 +13276,12 @@ static int ZEND_FASTCALL ZEND_FE_FETCH_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
if (key_type == HASH_KEY_IS_LONG) {
ZVAL_LONG(key, int_key);
} else {
//??? const char *class_name, *prop_name;
//??? int prop_name_len;
//??? zend_unmangle_property_name_ex(
//??? str_key, &class_name, &prop_name, &prop_name_len
//??? );
//??? ZVAL_STRINGL(key, prop_name, prop_name_len, 1);
const char *class_name, *prop_name;
int prop_name_len;
zend_unmangle_property_name_ex(
str_key->val, str_key->len, &class_name, &prop_name, &prop_name_len
);
ZVAL_STRINGL(key, prop_name, prop_name_len);
}
}