Assert that call to method always has called scope or object

This commit is contained in:
Nikita Popov 2021-07-23 11:26:39 +02:00
parent 921e1052db
commit 8befb6d84f

View File

@ -213,6 +213,7 @@ static zend_always_inline zend_vm_stack zend_vm_stack_new_page(size_t size, zend
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)
{
ZEND_ASSERT(!func->common.scope || object_or_called_scope);
call->func = func;
Z_PTR(call->This) = object_or_called_scope;
ZEND_CALL_INFO(call) = call_info;