diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2020-09-17 09:59:44 +0200 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-09-17 09:59:51 +0200 |
| commit | e3d0bc0a981f11970415ab3ac635b98f6740bfb4 (patch) | |
| tree | 8b842dbe3b62259c1210245be60cf49a0c82388b /Zend | |
| parent | 8f56b7a7555c7381ab4005ae56a76c23d5da226a (diff) | |
| download | php-git-e3d0bc0a981f11970415ab3ac635b98f6740bfb4.tar.gz | |
Fixed bug #80109
Skip over leading EXT_NOP, if it exists.
Diffstat (limited to 'Zend')
| -rw-r--r-- | Zend/zend_execute.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 3c19311094..22afd49c2e 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -4452,15 +4452,16 @@ static void end_fake_frame(zend_execute_data *call, zend_execute_data *old_prev_ ZEND_API zend_result ZEND_FASTCALL zend_handle_undef_args(zend_execute_data *call) { zend_function *fbc = call->func; if (fbc->type == ZEND_USER_FUNCTION) { + zend_op_array *op_array = &fbc->op_array; uint32_t num_args = ZEND_CALL_NUM_ARGS(call); + uint32_t opline_offset = op_array->opcodes[0].opcode == ZEND_EXT_NOP; for (uint32_t i = 0; i < num_args; i++) { zval *arg = ZEND_CALL_VAR_NUM(call, i); if (!Z_ISUNDEF_P(arg)) { continue; } - zend_op_array *op_array = &fbc->op_array; - zend_op *opline = &op_array->opcodes[i]; + zend_op *opline = &op_array->opcodes[i + opline_offset]; if (EXPECTED(opline->opcode == ZEND_RECV_INIT)) { zval *default_value = RT_CONSTANT(opline, opline->op2); if (Z_OPT_TYPE_P(default_value) == IS_CONSTANT_AST) { |
