Skip to content

Commit 350d755

Browse files
author
Derick Rethans
committed
- Update NEWS and README for input_filters
1 parent 750b033 commit 350d755

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? Oct 2003, PHP 5 Beta 3
44
- Added possibility to call PHP functions as XSLT-functions. (Christian)
5+
- Added possibility to prevent PHP from regustering variables when
6+
input filter support is used. (Derick)
57
- Added new functions:
68
. dba_key_split() to split inifile keys in an array. (Marcus)
79
. time_nanosleep() signal safe sleep (Magnus, Ilia)

README.input_filter

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ PHP_MINFO_FUNCTION(my_input_filter)
8989
php_info_print_table_end();
9090
}
9191

92+
/* The filter handler. If you return 1 from it, then PHP also registers the
93+
* (modified) variable. Returning 0 prevents PHP from registering the variable;
94+
* you can use this if your filter already registers the variable under a
95+
* different name, or if you just don't want the variable registered at all. */
9296
unsigned int my_sapi_input_filter(int arg, char *var, char **val, unsigned int val_len, unsigned int *new_val_len)
9397
{
9498
zval new_var;
@@ -138,7 +142,7 @@ unsigned int my_sapi_input_filter(int arg, char *var, char **val, unsigned int
138142
php_strip_tags(*val, val_len, NULL, NULL, 0);
139143

140144
*new_val_len = strlen(*val);
141-
return 1;
145+
return 1;
142146
}
143147

144148
PHP_FUNCTION(my_get_raw)

0 commit comments

Comments
 (0)