Reset variables back to empty arrays instead of unsetting them in dbDelta. prevents a warning. props mitchoyoshitaka, fixes #13715.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
848d51b83a
commit
3c79510246
|
@ -1401,9 +1401,7 @@ function dbDelta($queries, $execute = true) {
|
||||||
foreach ($tables as $table) {
|
foreach ($tables as $table) {
|
||||||
// If a table query exists for the database table...
|
// If a table query exists for the database table...
|
||||||
if ( array_key_exists(strtolower($table), $cqueries) ) {
|
if ( array_key_exists(strtolower($table), $cqueries) ) {
|
||||||
// Clear the field and index arrays
|
$cfields = $indices = array();
|
||||||
unset($cfields);
|
|
||||||
unset($indices);
|
|
||||||
// Get all of the field names in the query from between the parens
|
// Get all of the field names in the query from between the parens
|
||||||
preg_match("|\((.*)\)|ms", $cqueries[strtolower($table)], $match2);
|
preg_match("|\((.*)\)|ms", $cqueries[strtolower($table)], $match2);
|
||||||
$qryline = trim($match2[1]);
|
$qryline = trim($match2[1]);
|
||||||
|
|
Loading…
Reference in New Issue