summaryrefslogtreecommitdiff
path: root/sapi/apache_hooks/php_apache.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2009-01-05 16:24:26 +0000
committerIlia Alshanetsky <iliaa@php.net>2009-01-05 16:24:26 +0000
commitf0240a0382c7ac38144543965f7c45e57af54665 (patch)
treec49747e7d5c004d52b4bf1ebdefec935fdd033ad /sapi/apache_hooks/php_apache.c
parent9b9cd5421dcbd4d4cabd11acdbdcd437785abf89 (diff)
downloadphp-git-f0240a0382c7ac38144543965f7c45e57af54665.tar.gz
MFB: Improved parameter handling
Diffstat (limited to 'sapi/apache_hooks/php_apache.c')
-rw-r--r--sapi/apache_hooks/php_apache.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sapi/apache_hooks/php_apache.c b/sapi/apache_hooks/php_apache.c
index 5cdd31ef05..d0191d2929 100644
--- a/sapi/apache_hooks/php_apache.c
+++ b/sapi/apache_hooks/php_apache.c
@@ -1551,18 +1551,17 @@ PHP_FUNCTION(apache_child_terminate)
Get and set Apache request notes */
PHP_FUNCTION(apache_note)
{
- char *arg_name, *arg_val;
+ char *arg_name, *arg_val = NULL;
int arg_name_len, arg_val_len;
char *note_val;
- int arg_count = ZEND_NUM_ARGS();
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", &arg_name, &arg_name_len, &arg_val, &arg_val_len) == FAILURE) {
return;
}
note_val = (char *) table_get(((request_rec *)SG(server_context))->notes, arg_name);
-
- if (arg_count == 2) {
+
+ if (arg_val) {
table_set(((request_rec *)SG(server_context))->notes, arg_name, arg_val);
}