diff options
Diffstat (limited to 'sapi/apache/php_apache.c')
-rw-r--r-- | sapi/apache/php_apache.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sapi/apache/php_apache.c b/sapi/apache/php_apache.c index aa7b45f2ad..8438ceb2a3 100644 --- a/sapi/apache/php_apache.c +++ b/sapi/apache/php_apache.c @@ -312,18 +312,17 @@ PHP_FUNCTION(apache_child_terminate) Get and set Apache request notes */ PHP_FUNCTION(apache_note) { - char *note_name, *note_val; + char *note_name, *note_val = NULL; int note_name_len, note_val_len; char *old_val; - int arg_count = ZEND_NUM_ARGS(); - if (zend_parse_parameters(arg_count TSRMLS_CC, "s|s", ¬e_name, ¬e_name_len, ¬e_val, ¬e_val_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", ¬e_name, ¬e_name_len, ¬e_val, ¬e_val_len) == FAILURE) { return; } old_val = (char *) table_get(((request_rec *)SG(server_context))->notes, note_name); - if (arg_count == 2) { + if (note_val) { table_set(((request_rec *)SG(server_context))->notes, note_name, note_val); } |