diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-10-06 23:48:10 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2015-10-06 23:48:10 +0300 |
commit | 524d00e005dd730454709060e30b43d97c3a06c6 (patch) | |
tree | 87a4b572ee69168325a103b68e268bdba7784468 /Zend/zend_vm_execute.h | |
parent | 3c0348056a085395b045bf9dc65d26c7da503488 (diff) | |
download | php-git-524d00e005dd730454709060e30b43d97c3a06c6.tar.gz |
Revert "Allow random $this on non-internal Closures again"
This reverts commit 35d0405c4790f0ce668c9e1b8b05197e55d29a05.
Diffstat (limited to 'Zend/zend_vm_execute.h')
-rw-r--r-- | Zend/zend_vm_execute.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index e2a4fa94b0..b8da79921d 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -534,6 +534,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_ } zend_vm_stack_free_extra_args_ex(call_info, execute_data); EG(current_execute_data) = EX(prev_execute_data); + if (UNEXPECTED(call_info & ZEND_CALL_CLOSURE)) { + OBJ_RELEASE((zend_object*)EX(func)->op_array.prototype); + } } else /* if (call_kind == ZEND_CALL_TOP_CODE) */ { zend_array *symbol_table = EX(symbol_table); @@ -916,9 +919,6 @@ fcall_end_change_scope: } OBJ_RELEASE(object); } - if (UNEXPECTED((ZEND_CALL_INFO(call) & ZEND_CALL_CLOSURE) && (fbc->common.fn_flags & ZEND_ACC_GENERATOR) == 0)) { - OBJ_RELEASE((zend_object*)fbc->op_array.prototype); - } EG(scope) = EX(func)->op_array.scope; fcall_end: |