Added param checks for ap2 fetch respose/request header functions.
authorIlia Alshanetsky <iliaa@php.net>
Tue, 3 Jan 2006 20:13:07 +0000 (20:13 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 3 Jan 2006 20:13:07 +0000 (20:13 +0000)
sapi/apache2handler/php_functions.c

index 2df54c5d4552d78b2d2293743642dc005529e105..1e9b60abeff59b17e59a16030d69d713be73d72d 100644 (file)
@@ -179,6 +179,10 @@ PHP_FUNCTION(apache_request_headers)
        const apr_array_header_t *arr;
        char *key, *val;
 
+       if (ZEND_NUM_ARGS()) {
+               WRONG_PARAM_COUNT;
+       }
+
        array_init(return_value);
        
        ctx = SG(server_context);
@@ -199,6 +203,10 @@ PHP_FUNCTION(apache_response_headers)
        const apr_array_header_t *arr;
        char *key, *val;
 
+       if (ZEND_NUM_ARGS()) {
+               WRONG_PARAM_COUNT;
+       }
+
        array_init(return_value);
        
        ctx = SG(server_context);