]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
make common_copy_args() work when the post/get request includes arrays (form elements...
authorCraig Andrews <candrews@integralblue.com>
Tue, 9 Mar 2010 02:42:17 +0000 (21:42 -0500)
committerCraig Andrews <candrews@integralblue.com>
Tue, 9 Mar 2010 02:43:34 +0000 (21:43 -0500)
lib/util.php

index da2799d4f92d23766c464b1e15b4c66ab6704217..c5dacb699604711db147f4177603627db462aaa8 100644 (file)
@@ -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;
 }