note 96246 added to function.trim
| From: | thek at o2 dot pl | Date: | Wed, 17 Feb 2010 10:36:20 +0000 |
| Subject: | note 96246 added to function.trim | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-166048@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 194.24.174.37
Probable Submitter: 95.51.3.218
----
Manual Page -- http://www.php.net/manual/en/function.trim.php
Edit -- https://master.php.net/note/edit/96246
Del: integrated -- https://master.php.net/note/delete/96246/integrated
Del: useless -- https://master.php.net/note/delete/96246/useless
Del: bad code -- https://master.php.net/note/delete/96246/bad+code
Del: spam -- https://master.php.net/note/delete/96246/spam
Del: non-english -- https://master.php.net/note/delete/96246/non-english
Del: in docs -- https://master.php.net/note/delete/96246/in+docs
Del: other reasons-- https://master.php.net/note/delete/96246
Reject -- https://master.php.net/note/reject/96246
Search -- https://master.php.net/manage/user-notes.php