note 96246 deleted from function.trim by hholzgra
| From: | hholzgra@php.net | Date: | Thu, 02 Aug 2012 12:31:03 +0000 |
| Subject: | note 96246 deleted from function.trim by hholzgra | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-189672@lists.php.net to get a copy of this message | ||
Note Submitter: thek at o2 dot pl
----
There is a trap when making "form prefilters". Something like
$_POST = array_map('trim', $_POST)
may be not what we wanted, because when there are arrays in form made by field[] this
"prefilter" return not an array but, according to his behavior, string. So as a effect we
see in var_dump not array but field = "Array" what can mess up our validation.