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
This commit is contained in:
parent
683db28b4c
commit
5f4c602776
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue