note 84299 added to function.filter-input-array
| From: | Kevin at osu1 dot php dot net | Date: | Tue, 08 Jul 2008 13:37:35 +0000 |
| Subject: | note 84299 added to function.filter-input-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-141267@lists.php.net to get a copy of this message | ||
Looks like filter_input_array isn't aware of changes to the input arrays that were made before
calling filter_input_array. Instead, it always looks at the originally submitted input arrays.
So this will not work:
$_POST['my_float_field'] =
str_replace(',','.',$_POST['my_float_field']);
$args = array('my_float_field',FILTER_VALIDATE_FLOAT);
$result = filter_input_array(INPUT_POST, $args);
----
Server IP: 217.160.72.57
Probable Submitter: 88.66.255.194
----
Manual Page -- http://www.php.net/manual/en/function.filter-input-array.php
Edit -- https://master.php.net/note/edit/84299
Del: integrated -- https://master.php.net/note/delete/84299/integrated
Del: useless -- https://master.php.net/note/delete/84299/useless
Del: bad code -- https://master.php.net/note/delete/84299/bad+code
Del: spam -- https://master.php.net/note/delete/84299/spam
Del: non-english -- https://master.php.net/note/delete/84299/non-english
Del: in docs -- https://master.php.net/note/delete/84299/in+docs
Del: other reasons-- https://master.php.net/note/delete/84299
Reject -- https://master.php.net/note/reject/84299
Search -- https://master.php.net/manage/user-notes.php