Cast to array when using foreach(). Props santosj (and thanks for your perseverance!). fixes #2784

git-svn-id: https://develop.svn.wordpress.org/trunk@8572 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2008-08-06 20:31:54 +00:00
parent 3937bd9530
commit 3cab99fbd2
22 changed files with 125 additions and 124 deletions
+2 -2
View File
@@ -793,11 +793,11 @@ function wp_kses_stripslashes($string) {
function wp_kses_array_lc($inarray) {
$outarray = array ();
foreach ($inarray as $inkey => $inval) {
foreach ( (array) $inarray as $inkey => $inval) {
$outkey = strtolower($inkey);
$outarray[$outkey] = array ();
foreach ($inval as $inkey2 => $inval2) {
foreach ( (array) $inval as $inkey2 => $inval2) {
$outkey2 = strtolower($inkey2);
$outarray[$outkey][$outkey2] = $inval2;
} # foreach $inval