Skip to content

Commit 29c88c0

Browse files
feat: use modern ZEND_PARSE_PARAMETERS_NONE() macro (#1704)
1 parent 80de1f8 commit 29c88c0

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

frankenphp.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,7 @@ static int frankenphp_worker_request_startup() {
248248
}
249249

250250
PHP_FUNCTION(frankenphp_finish_request) { /* {{{ */
251-
if (zend_parse_parameters_none() == FAILURE) {
252-
RETURN_THROWS();
253-
}
251+
ZEND_PARSE_PARAMETERS_NONE();
254252

255253
if (go_is_context_done(thread_index)) {
256254
RETURN_FALSE;
@@ -318,9 +316,7 @@ PHP_FUNCTION(frankenphp_getenv) {
318316

319317
/* {{{ Fetch all HTTP request headers */
320318
PHP_FUNCTION(frankenphp_request_headers) {
321-
if (zend_parse_parameters_none() == FAILURE) {
322-
RETURN_THROWS();
323-
}
319+
ZEND_PARSE_PARAMETERS_NONE();
324320

325321
struct go_apache_request_headers_return headers =
326322
go_apache_request_headers(thread_index);
@@ -378,9 +374,7 @@ static void add_response_header(sapi_header_struct *h,
378374

379375
PHP_FUNCTION(frankenphp_response_headers) /* {{{ */
380376
{
381-
if (zend_parse_parameters_none() == FAILURE) {
382-
RETURN_THROWS();
383-
}
377+
ZEND_PARSE_PARAMETERS_NONE();
384378

385379
array_init(return_value);
386380
zend_llist_apply_with_argument(

0 commit comments

Comments
 (0)