SF.net SVN: postfixadmin: [138] trunk/functions.inc.php
Brought to you by:
christian_boltz,
gingerdog
From: <chr...@us...> - 2007-10-07 19:16:44
|
Revision: 138 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=138&view=rev Author: christian_boltz Date: 2007-10-07 12:16:48 -0700 (Sun, 07 Oct 2007) Log Message: ----------- - escape_string(): preserve array keys when escaping arrays Modified Paths: -------------- trunk/functions.inc.php Modified: trunk/functions.inc.php =================================================================== --- trunk/functions.inc.php 2007-10-07 17:49:50 UTC (rev 137) +++ trunk/functions.inc.php 2007-10-07 19:16:48 UTC (rev 138) @@ -287,8 +287,8 @@ // Note, the array keys are not cleaned. if(is_array($string)) { $clean = array(); - foreach($string as $row) { - $clean[] = escape_string($row); + foreach(array_keys($string) as $row) { + $clean[$row] = escape_string($string[$row]); } return $clean; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |