Permalink
Browse files

Cast to array in upgrade foreach(). props arnee. fixes #5047

git-svn-id: http://svn.automattic.com/wordpress/trunk@6158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent 683db28 commit 5f4c60277644ba7430657d66a667c8e47333e900 markjaquith committed Sep 22, 2007
Showing with 1 addition and 1 deletion.
  1. +1 −1 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;

0 comments on commit 5f4c602

Please sign in to comment.