Skip to content

Commit a4e1032

Browse files
committed
- For internal classes we must auto generate the abstract class flags.
# Actually providing the flags while registering the class is not possible # since that would require a major API change.
1 parent d5bf30a commit a4e1032

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Zend/zend_compile.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2144,8 +2144,12 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
21442144
zend_hash_merge(&ce->constants_table, &parent_ce->constants_table, (void (*)(void *)) zval_add_ref, NULL, sizeof(zval *), 0);
21452145
zend_hash_merge_ex(&ce->function_table, &parent_ce->function_table, (copy_ctor_func_t) do_inherit_method, sizeof(zend_function), (merge_checker_func_t) do_inherit_method_check, ce);
21462146
do_inherit_parent_constructor(ce);
2147-
2148-
zend_verify_abstract_class(ce TSRMLS_CC);
2147+
2148+
if (ce->ce_flags & ZEND_ACC_IMPLICIT_ABSTRACT_CLASS && ce->type == ZEND_INTERNAL_CLASS) {
2149+
ce->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS;
2150+
} else {
2151+
zend_verify_abstract_class(ce TSRMLS_CC);
2152+
}
21492153
}
21502154

21512155

0 commit comments

Comments
 (0)