#43018 [NEW]: filter_var() does not support arrays as implied by the documentation

From: Date: Thu, 18 Oct 2007 11:46:27 +0000
Subject: #43018 [NEW]: filter_var() does not support arrays as implied by the documentation
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-145@lists.php.net to get a copy of this message
From: lsmith@php.net Operating system: Irrelevant PHP version: Irrelevant PHP Bug Type: Documentation problem Bug description: filter_var() does not support arrays as implied by the documentation 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 bug report at http://bugs.php.net/?id=43018&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43018&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43018&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43018&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43018&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43018&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43018&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43018&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=43018&r=needscript Try newer version: http://bugs.php.net/fix.php?id=43018&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43018&r=support Expected behavior: http://bugs.php.net/fix.php?id=43018&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43018&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43018&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43018&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43018&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43018&r=dst IIS Stability: http://bugs.php.net/fix.php?id=43018&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43018&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43018&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43018&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=43018&r=mysqlcfg

« previous php.doc.bugs (#145) next »