Bug #52500 [NEW]: Using array_map, strip tags & nested $_POST array
| From: | jason dot gerfen at gmail dot com | Date: | Fri, 30 Jul 2010 13:33:55 +0000 |
| Subject: | Bug #52500 [NEW]: Using array_map, strip tags & nested $_POST array | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-152979@lists.php.net to get a copy of this message | ||
From:
Operating system: Ubuntu 10
PHP version: 5.2.14
Package: Scripting Engine problem
Bug Type: Bug
Bug description:Using array_map, strip tags & nested $_POST array
Description:
------------
When using a combination of array_map() & strip_tags to create a localized
copy of the $_POST superglobal array I am experiencing problems if $_POST
contains a nested array.
It seems to discard any secondary iteration of said nested array.
Test script:
---------------
$_POST = array('level-1-1', $var1,
'level-1-2', $var2,
'level-1-3', $var3,
'level-1-4', array('level-2-1', $var1,
'level-2-2', $var2,
'level-2-3', $var3),
'level-1-5', $var5);
$post = array_map(strip_tags, $_POST);
echo '<pre>'; print_r($post); echo '</pre>';
/* I am left with this?
level-1-1 => $var1
level-1-2 => $var2
level-1-3 => $var3
level-1-5 => $var5
*/
Expected result:
----------------
I expected a complete copy of the nested superglobal $_POST.
Actual result:
--------------
Any nested array information is getting stripped out.
--
Edit bug report at http://bugs.php.net/bug.php?id=52500&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52500&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52500&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52500&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=52500&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52500&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=52500&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=52500&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=52500&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=52500&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=52500&r=support
Expected behavior: http://bugs.php.net/fix.php?id=52500&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=52500&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=52500&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=52500&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52500&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=52500&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=52500&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=52500&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=52500&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=52500&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=52500&r=mysqlcfg