mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
Enforce semantics: Classes cannot extend Interfaces
This commit is contained in:
parent
b1d43bac61
commit
ec4f576cb3
@ -2125,6 +2125,10 @@ ZEND_API zend_class_entry *do_bind_inherited_class(zend_op *opline, HashTable *c
|
||||
ce = *pce;
|
||||
}
|
||||
|
||||
if (parent_ce->ce_flags & ZEND_ACC_INTERFACE) {
|
||||
zend_error(E_COMPILE_ERROR, "Class %s cannot extend from interfac %s", ce->name, parent_ce->name);
|
||||
}
|
||||
|
||||
zend_do_inheritance(ce, parent_ce TSRMLS_CC);
|
||||
|
||||
ce->refcount++;
|
||||
|
Loading…
Reference in New Issue
Block a user