From 7f396bfab07f11c6e7bf710f2daab8aeb89560b1 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 8 Jul 2013 13:54:19 +0000 Subject: [PATCH] Avoid possible array collision in dbDelta when recording index adds. props apimlott, wonderboymusic. fixes #21272. git-svn-id: http://core.svn.wordpress.org/trunk@24584 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 60077a83ef..24b05ba300 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -1652,7 +1652,7 @@ function dbDelta( $queries = '', $execute = true ) { 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; + $for_update[] = 'Added index ' . $table . ' ' . $index; } // Remove the original table creation query from processing