- Fix trait flag identification

This commit is contained in:
Felipe Pena 2010-05-04 18:31:40 +00:00
parent 45a536fc7c
commit e431cec023
2 changed files with 2 additions and 2 deletions

View File

@ -3230,7 +3230,7 @@ ZEND_VM_HANDLER(68, ZEND_NEW, ANY, ANY)
if (EX_T(opline->op1.var).class_entry->ce_flags & ZEND_ACC_INTERFACE) {
class_type = "interface";
} else if (EX_T(opline->op1.var).class_entry->ce_flags & ZEND_ACC_TRAIT) {
} else if ((EX_T(opline->op1.var).class_entry->ce_flags & ~ZEND_ACC_EXPLICIT_ABSTRACT_CLASS) & ZEND_ACC_TRAIT) {
class_type = "trait";
} else {
class_type = "abstract class";

View File

@ -520,7 +520,7 @@ static int ZEND_FASTCALL ZEND_NEW_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
if (EX_T(opline->op1.var).class_entry->ce_flags & ZEND_ACC_INTERFACE) {
class_type = "interface";
} else if (EX_T(opline->op1.var).class_entry->ce_flags & ZEND_ACC_TRAIT) {
} else if ((EX_T(opline->op1.var).class_entry->ce_flags & ~ZEND_ACC_EXPLICIT_ABSTRACT_CLASS) & ZEND_ACC_TRAIT) {
class_type = "trait";
} else {
class_type = "abstract class";