1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Remove static __invoke() handling in zend_std_get_closure()

Static __invoke() is disallowed since PHP 8.0.

Closes GH-18171
This commit is contained in:
Ilija Tovilo
2025-03-28 14:30:38 +01:00
parent ce3d1cd5cb
commit a6aacd851b

View File

@@ -2451,17 +2451,9 @@ ZEND_API zend_result zend_std_get_closure(zend_object *obj, zend_class_entry **c
return FAILURE;
}
*fptr_ptr = Z_FUNC_P(func);
*ce_ptr = ce;
if ((*fptr_ptr)->common.fn_flags & ZEND_ACC_STATIC) {
if (obj_ptr) {
*obj_ptr = NULL;
}
} else {
if (obj_ptr) {
*obj_ptr = obj;
}
}
*obj_ptr = obj;
return SUCCESS;
}
/* }}} */