diff options
Diffstat (limited to 'sapi/apache_hooks/php_apache.c')
-rw-r--r-- | sapi/apache_hooks/php_apache.c | 7 |
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); } |