summaryrefslogtreecommitdiff
path: root/README.input_filter
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2003-11-29 15:24:35 (GMT)
committerDerick Rethans <derick@php.net>2003-11-29 15:24:35 (GMT)
commit750b0338bf1a2ae6d2fe48396801ad13a29255a2 (patch)
tree34df9d9b724f29704400d6f13ba040add72ac58b /README.input_filter
parentf7830195c02682482e8e644ad10fd96de0d654ae (diff)
downloadphp-750b0338bf1a2ae6d2fe48396801ad13a29255a2.tar.gz
- Fix sapi_input_filter patch. Returning 1 from the filter handler should
make PHP register the variable, returning 0 shouldn't. The new length of the variables being filtered is now returned in the new_val_len argument of the function.
Diffstat (limited to 'README.input_filter')
-rw-r--r--README.input_filter5
1 files changed, 3 insertions, 2 deletions
diff --git a/README.input_filter b/README.input_filter
index 60a88ed..8064655 100644
--- a/README.input_filter
+++ b/README.input_filter
@@ -89,7 +89,7 @@ PHP_MINFO_FUNCTION(my_input_filter)
php_info_print_table_end();
}
-unsigned int my_sapi_input_filter(int arg, char *var, char **val, unsigned int val_len)
+unsigned int my_sapi_input_filter(int arg, char *var, char **val, unsigned int val_len, unsigned int *new_val_len)
{
zval new_var;
zval *array_ptr = NULL;
@@ -137,7 +137,8 @@ unsigned int my_sapi_input_filter(int arg, char *var, char **val, unsigned int
php_strip_tags(*val, val_len, NULL, NULL, 0);
- return strlen(*val);
+ *new_val_len = strlen(*val);
+ return 1;
}
PHP_FUNCTION(my_get_raw)