summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2020-08-05 18:45:07 +0200
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-08-07 12:35:30 +0200
commitaf80d8a14e5540a151e2b40f165ebe122467484b (patch)
treec852017699321228cb32ae5764f817ee64be1a2a /main
parent3bb183036976fc8bfdf039b41efe1e4312894937 (diff)
downloadphp-git-af80d8a14e5540a151e2b40f165ebe122467484b.tar.gz
Add more argument types to stubs
Closes GH-5943
Diffstat (limited to 'main')
-rw-r--r--main/SAPI.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/main/SAPI.c b/main/SAPI.c
index b2963225ba..e30d8d780c 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -112,22 +112,19 @@ SAPI_API void sapi_free_header(sapi_header_struct *sapi_header)
/* {{{ call a header function */
PHP_FUNCTION(header_register_callback)
{
- zval *callback_func;
+ zend_fcall_info fci;
+ zend_fcall_info_cache fcc;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &callback_func) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "f", &fci, &fcc) == FAILURE) {
RETURN_THROWS();
}
- if (!zend_is_callable(callback_func, 0, NULL)) {
- RETURN_FALSE;
- }
-
if (Z_TYPE(SG(callback_func)) != IS_UNDEF) {
zval_ptr_dtor(&SG(callback_func));
SG(fci_cache) = empty_fcall_info_cache;
}
- ZVAL_COPY(&SG(callback_func), callback_func);
+ ZVAL_COPY(&SG(callback_func), &fci.function_name);
RETURN_TRUE;
}