summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2010-03-08 21:42:17 -0500
committerCraig Andrews <candrews@integralblue.com>2010-03-08 21:43:34 -0500
commit689e2e112bbd84ab05549b83bf99be1d8c1a39e9 (patch)
tree0734a0c9f2c759c96cdef189338a1b8b18fcd702 /lib/util.php
parentf8c5996758250dce4d0f922cdbc10dff653f73c5 (diff)
make common_copy_args() work when the post/get request includes arrays (form elements with names ending in [] having multiple values)
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/util.php b/lib/util.php
index da2799d4f..c5dacb699 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -1462,7 +1462,15 @@ function common_copy_args($from)
$to = array();
$strip = get_magic_quotes_gpc();
foreach ($from as $k => $v) {
- $to[$k] = ($strip) ? stripslashes($v) : $v;
+ if($strip) {
+ if(is_array($v)) {
+ $to[$k] = common_copy_args($v);
+ } else {
+ $to[$k] = stripslashes($v);
+ }
+ } else {
+ $to[$k] = $v;
+ }
}
return $to;
}