mirror of
https://github.com/php/php-src.git
synced 2024-12-01 05:43:38 +08:00
Don't allow interfaces to implement anything
This commit is contained in:
parent
8f0ea19fcb
commit
59d168eda7
@ -2420,6 +2420,10 @@ void zend_do_implements_interface(znode *interface_znode TSRMLS_DC)
|
||||
{
|
||||
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
|
||||
|
||||
if (CG(active_class_entry)->ce_flags & ZEND_ACC_INTERFACE) {
|
||||
zend_error(E_COMPILE_ERROR, "Interfaces cannot implement other classes/interfaces");
|
||||
}
|
||||
|
||||
opline->opcode = ZEND_ADD_INTERFACE;
|
||||
opline->op1 = CG(implementing_class);
|
||||
opline->op2 = *interface_znode;
|
||||
|
Loading…
Reference in New Issue
Block a user