Skip to content

Commit 12cf23c

Browse files
committed
Initialize attributes for indirection function
This become problematic in PHP 8.2, because attributes are checked during backtrace generation.
1 parent ee9c514 commit 12cf23c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scalar_objects.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ static zend_function *scalar_objects_get_indirection_func(
161161
ind->fn.fn_flags = ZEND_ACC_CALL_VIA_HANDLER | (fbc->common.fn_flags & keep_flags);
162162
ind->fn.num_args = fbc->common.num_args - 1;
163163
ind->fn.required_num_args = fbc->common.required_num_args - 1;
164+
#if PHP_VERSION_ID >= 80000
165+
ind->fn.attributes = NULL;
166+
#endif
164167
#if PHP_VERSION_ID >= 80200
165168
ind->fn.T = 0;
166169
#endif

0 commit comments

Comments
 (0)