From 58951fbf39c7d8553e613b3e31a5e89b027100c0 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 11 Jun 2010 03:01:51 +0000 Subject: [PATCH] Reset variables back to empty arrays instead of unsetting them in dbDelta. prevents a warning. props mitchoyoshitaka, fixes #13715. git-svn-id: https://develop.svn.wordpress.org/trunk@15210 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/upgrade.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index d869cc2c6e..09063c209b 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -1401,9 +1401,7 @@ function dbDelta($queries, $execute = true) { foreach ($tables as $table) { // If a table query exists for the database table... if ( array_key_exists(strtolower($table), $cqueries) ) { - // Clear the field and index arrays - unset($cfields); - unset($indices); + $cfields = $indices = array(); // Get all of the field names in the query from between the parens preg_match("|\((.*)\)|ms", $cqueries[strtolower($table)], $match2); $qryline = trim($match2[1]);