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
This commit is contained in:
parent
55b3c67413
commit
7f396bfab0
|
@ -1652,7 +1652,7 @@ function dbDelta( $queries = '', $execute = true ) {
|
||||||
foreach ( (array) $indices as $index ) {
|
foreach ( (array) $indices as $index ) {
|
||||||
// Push a query line into $cqueries that adds the index to that table
|
// Push a query line into $cqueries that adds the index to that table
|
||||||
$cqueries[] = "ALTER TABLE {$table} ADD $index";
|
$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
|
// Remove the original table creation query from processing
|
||||||
|
|
Loading…
Reference in New Issue