summaryrefslogtreecommitdiff
path: root/sapi/apache2handler/php_functions.c
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/apache2handler/php_functions.c')
-rw-r--r--sapi/apache2handler/php_functions.c75
1 files changed, 18 insertions, 57 deletions
diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
index c82b93f965..d1aa2d587c 100644
--- a/sapi/apache2handler/php_functions.c
+++ b/sapi/apache2handler/php_functions.c
@@ -1,7 +1,5 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
@@ -45,6 +43,7 @@
#endif
#include "php_apache.h"
+#include "php_functions_arginfo.h"
#ifdef ZTS
int php_apache2_info_id;
@@ -74,7 +73,7 @@ PHP_FUNCTION(virtual)
request_rec *rr;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &filename, &filename_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!(rr = php_apache_lookup_uri(filename))) {
@@ -120,7 +119,7 @@ PHP_FUNCTION(apache_lookup_uri)
size_t filename_len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &filename, &filename_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
if (!(rr = php_apache_lookup_uri(filename))) {
@@ -175,7 +174,7 @@ PHP_FUNCTION(apache_request_headers)
char *key, *val;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
array_init(return_value);
@@ -199,7 +198,7 @@ PHP_FUNCTION(apache_response_headers)
char *key, *val;
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
array_init(return_value);
@@ -224,7 +223,7 @@ PHP_FUNCTION(apache_note)
char *old_note_val=NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|s", &note_name, &note_name_len, &note_val, &note_val_len) == FAILURE) {
- return;
+ RETURN_THROWS();
}
ctx = SG(server_context);
@@ -258,7 +257,7 @@ PHP_FUNCTION(apache_setenv)
request_rec *r;
if (zend_parse_parameters(arg_count, "ss|b", &variable, &variable_len, &string_val, &string_val_len, &walk_to_top) == FAILURE) {
- return;
+ RETURN_THROWS();
}
ctx = SG(server_context);
@@ -294,7 +293,7 @@ PHP_FUNCTION(apache_getenv)
request_rec *r;
if (zend_parse_parameters(arg_count, "s|b", &variable, &variable_len, &walk_to_top) == FAILURE) {
- return;
+ RETURN_THROWS();
}
ctx = SG(server_context);
@@ -477,55 +476,17 @@ PHP_MINFO_FUNCTION(apache)
}
}
-/* {{{ arginfo */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_apache2handler_lookup_uri, 0, 0, 1)
- ZEND_ARG_INFO(0, filename)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_apache2handler_virtual, 0, 0, 1)
- ZEND_ARG_INFO(0, uri)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO(arginfo_apache2handler_response_headers, 0)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO(arginfo_apache2handler_getallheaders, 0)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_apache2handler_note, 0, 0, 1)
- ZEND_ARG_INFO(0, note_name)
- ZEND_ARG_INFO(0, note_value)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_apache2handler_setenv, 0, 0, 2)
- ZEND_ARG_INFO(0, variable)
- ZEND_ARG_INFO(0, value)
- ZEND_ARG_INFO(0, walk_to_top)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_apache2handler_getenv, 0, 0, 1)
- ZEND_ARG_INFO(0, variable)
- ZEND_ARG_INFO(0, walk_to_top)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO(arginfo_apache2handler_get_version, 0)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO(arginfo_apache2handler_get_modules, 0)
-ZEND_END_ARG_INFO()
-/* }}} */
-
static const zend_function_entry apache_functions[] = {
- PHP_FE(apache_lookup_uri, arginfo_apache2handler_lookup_uri)
- PHP_FE(virtual, arginfo_apache2handler_virtual)
- PHP_FE(apache_request_headers, arginfo_apache2handler_getallheaders)
- PHP_FE(apache_response_headers, arginfo_apache2handler_response_headers)
- PHP_FE(apache_setenv, arginfo_apache2handler_setenv)
- PHP_FE(apache_getenv, arginfo_apache2handler_getenv)
- PHP_FE(apache_note, arginfo_apache2handler_note)
- PHP_FE(apache_get_version, arginfo_apache2handler_get_version)
- PHP_FE(apache_get_modules, arginfo_apache2handler_get_modules)
- PHP_FALIAS(getallheaders, apache_request_headers, arginfo_apache2handler_getallheaders)
+ PHP_FE(apache_lookup_uri, arginfo_apache_lookup_uri)
+ PHP_FE(virtual, arginfo_virtual)
+ PHP_FE(apache_request_headers, arginfo_apache_request_headers)
+ PHP_FE(apache_response_headers, arginfo_apache_response_headers)
+ PHP_FE(apache_setenv, arginfo_apache_setenv)
+ PHP_FE(apache_getenv, arginfo_apache_getenv)
+ PHP_FE(apache_note, arginfo_apache_note)
+ PHP_FE(apache_get_version, arginfo_apache_get_version)
+ PHP_FE(apache_get_modules, arginfo_apache_get_modules)
+ PHP_FALIAS(getallheaders, apache_request_headers, arginfo_getallheaders)
{NULL, NULL, NULL}
};