case IS_CONSTANT:
//??? /* Ugly hack to denote that this value has a constant index */
Z_STR(offset->u.constant)->gc.u.v.flags |= IS_STR_CONSTANT;
+ if (Z_TYPE(offset->u.constant) & IS_CONSTANT_UNQUALIFIED) {
+ Z_STR(offset->u.constant)->gc.u.v.flags |= IS_STR_CONSTANT_UNQUALIFIED;
+ }
//??? Z_TYPE(element) |= IS_CONSTANT_INDEX;
//??? Z_STRVAL(offset->u.constant) = erealloc(Z_STRVAL(offset->u.constant), Z_STRLEN(offset->u.constant)+3);
//??? Z_STRVAL(offset->u.constant)[Z_STRLEN(offset->u.constant)+1] = Z_TYPE(offset->u.constant);
zend_ast_evaluate(&const_value, (zend_ast *)str_index->val, scope TSRMLS_CC);
zend_ast_destroy((zend_ast *)str_index->val);
//???
- } else if (!zend_get_constant_ex(str_index->val, str_index->len, &const_value, scope, 0 /*???str_index[str_index_len - 2]*/ TSRMLS_CC)) {
+ } else if (!zend_get_constant_ex(str_index->val, str_index->len, &const_value, scope, str_index->gc.u.v.flags TSRMLS_CC)) {
char *actual, *str;
const char *save = str_index->val;
int len;
if (save[0] == '\\') {
++save;
}
- if (str_index->gc.u.v.flags & IS_STR_CONSTANT_UNQUALIFIED) {
+ if (!(str_index->gc.u.v.flags & IS_STR_CONSTANT_UNQUALIFIED)) {
zend_error(E_ERROR, "Undefined constant '%s'", save);
}
- zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'", str_index, str_index);
+ zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'", str, str);
}
if (str == str_index->val && len == str_index->len) {
ZVAL_STR(&const_value, str_index);