From 787122b1b8bea1f37a91e616fa2d766c6a6a0af1 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Sat, 22 Sep 2007 23:14:38 +0000 Subject: [PATCH] Cast to array in upgrade foreach(). props arnee. fixes #5047 git-svn-id: https://develop.svn.wordpress.org/trunk@6158 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/upgrade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index fe1e74af16..5dded27306 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -1012,7 +1012,7 @@ function dbDelta($queries, $execute = true) { } // For every remaining index specified for the table - foreach($indices as $index) { + foreach ( (array) $indices as $index ) { // Push a query line into $cqueries that adds the index to that table $cqueries[] = "ALTER TABLE {$table} ADD $index"; $for_update[$table.'.'.$fieldname] = 'Added index '.$table.' '.$index;