summaryrefslogtreecommitdiff
path: root/Zend/zend_opcode.c
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2016-03-25 19:27:20 +0100
committerNikita Popov <nikic@php.net>2016-03-25 19:27:20 +0100
commit6c47455f73405658ae0ccd4e9d9da812080e8c83 (patch)
treeddfbaf4e05cb32f4d6e3d9cf7d3aba67c9107545 /Zend/zend_opcode.c
parent8e5b139732893d2a5f6ba3ae0a0b2b5cf6dba09f (diff)
downloadphp-git-6c47455f73405658ae0ccd4e9d9da812080e8c83.tar.gz
Fix assert() in EXT mode
Diffstat (limited to 'Zend/zend_opcode.c')
-rw-r--r--Zend/zend_opcode.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c
index 4800939b5f..6c1488ad0c 100644
--- a/Zend/zend_opcode.c
+++ b/Zend/zend_opcode.c
@@ -678,12 +678,18 @@ ZEND_API int pass_two(zend_op_array *op_array)
ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, opline->op2);
break;
case ZEND_ASSERT_CHECK:
+ {
/* If result of assert is unused, result of check is unused as well */
- if (op_array->opcodes[opline->op2.opline_num - 1].result_type == IS_UNUSED) {
+ zend_op *call = &op_array->opcodes[opline->op2.opline_num - 1];
+ if (call->opcode == ZEND_EXT_FCALL_END) {
+ call--;
+ }
+ if (call->result_type == IS_UNUSED) {
opline->result_type = IS_UNUSED;
}
ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, opline->op2);
break;
+ }
case ZEND_DECLARE_ANON_CLASS:
case ZEND_DECLARE_ANON_INHERITED_CLASS:
case ZEND_CATCH: