#43018 [Ver->Csd]: filter_var() does not support arrays as implied by the documentation
| From: | vrana@php.net | Date: | Wed, 21 Nov 2007 14:46:52 +0000 |
| Subject: | #43018 [Ver->Csd]: filter_var() does not support arrays as implied by the documentation | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-231@lists.php.net to get a copy of this message | ||
ID: 43018
Updated by: vrana@php.net
Reported By: lsmith@php.net
-Status: Verified
+Status: Closed
Bug Type: Documentation problem
Operating System: Irrelevant
PHP Version: Irrelevant
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2007-10-18 13:18:14] philip@php.net
Was it once going to work with arrays but then filter_var_array() was
created instead? This seems to be the case, and your code example
confirms it ;-)
------------------------------------------------------------------------
[2007-10-18 11:46:27] lsmith@php.net
Description:
------------
The documentation for filter_var
(http://php.net/manual/en/function.filter-var.php) implies that array's
are filtered recursively:
"Value to filter, arrays are filtered recursively."
However passing any array returns false
Reproduce code:
---------------
var_dump(filter_var_array(array('foo', array('bar')),
FILTER_UNSAFE_RAW));
Expected result:
----------------
array
0 => string 'foo' (length=3)
1 =>
array
0 => string 'bar' (length=3)
Actual result:
--------------
false
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43018&edit=1