mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
MFH: Bugfix# 39435: 'foo' instanceof bar gives invalid opcode error
This commit is contained in:
parent
18edb61440
commit
db87e11e6b
@ -3627,6 +3627,10 @@ void zend_do_instanceof(znode *result, znode *expr, znode *class_znode, int type
|
||||
}
|
||||
}
|
||||
|
||||
if (expr->op_type == IS_CONST) {
|
||||
zend_error(E_COMPILE_ERROR, "instanceof expects an object instance, constant given");
|
||||
}
|
||||
|
||||
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
|
||||
opline->opcode = ZEND_INSTANCEOF;
|
||||
opline->result.op_type = IS_TMP_VAR;
|
||||
|
Loading…
Reference in New Issue
Block a user