Skip to content

Commit a6aacd8

Browse files
committed
Remove static __invoke() handling in zend_std_get_closure()
Static __invoke() is disallowed since PHP 8.0. Closes GH-18171
1 parent ce3d1cd commit a6aacd8

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

Zend/zend_object_handlers.c

+2-10
Original file line numberDiff line numberDiff line change
@@ -2451,17 +2451,9 @@ ZEND_API zend_result zend_std_get_closure(zend_object *obj, zend_class_entry **c
24512451
return FAILURE;
24522452
}
24532453
*fptr_ptr = Z_FUNC_P(func);
2454-
24552454
*ce_ptr = ce;
2456-
if ((*fptr_ptr)->common.fn_flags & ZEND_ACC_STATIC) {
2457-
if (obj_ptr) {
2458-
*obj_ptr = NULL;
2459-
}
2460-
} else {
2461-
if (obj_ptr) {
2462-
*obj_ptr = obj;
2463-
}
2464-
}
2455+
*obj_ptr = obj;
2456+
24652457
return SUCCESS;
24662458
}
24672459
/* }}} */

0 commit comments

Comments
 (0)