Skip to content

Commit 8befb6d

Browse files
committed
Assert that call to method always has called scope or object
1 parent 921e105 commit 8befb6d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Zend/zend_execute.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ static zend_always_inline zend_vm_stack zend_vm_stack_new_page(size_t size, zend
213213

214214
static zend_always_inline void zend_vm_init_call_frame(zend_execute_data *call, uint32_t call_info, zend_function *func, uint32_t num_args, void *object_or_called_scope)
215215
{
216+
ZEND_ASSERT(!func->common.scope || object_or_called_scope);
216217
call->func = func;
217218
Z_PTR(call->This) = object_or_called_scope;
218219
ZEND_CALL_INFO(call) = call_info;

0 commit comments

Comments
 (0)