|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-07-31 10:59 UTC] johannes@php.net
-Status: Open
+Status: Bogus
[2010-07-31 10:59 UTC] johannes@php.net
[2010-07-31 18:17 UTC] jason dot gerfen at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 16 10:00:01 2025 UTC |
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.