Database: Support backticks around field names when parsing a query for the field type.

Avoids an undefined index PHP warning by `dbDelta()`.

Props davidmosterd, ocean90.
See #20263.
Built from https://develop.svn.wordpress.org/trunk@37538


git-svn-id: http://core.svn.wordpress.org/trunk@37506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2016-05-23 18:12:28 +00:00
parent 1947f4d17c
commit a5b8dca864
2 changed files with 2 additions and 2 deletions

View File

@ -2221,7 +2221,7 @@ function dbDelta( $queries = '', $execute = true ) {
if ( array_key_exists( $tablefield_field_lowercased, $cfields ) ) {
// Get the field type from the query.
preg_match("|".$tablefield->Field." ([^ ]*( unsigned)?)|i", $cfields[ $tablefield_field_lowercased ], $matches);
preg_match( '|`?' . $tablefield->Field . '`? ([^ ]*( unsigned)?)|i', $cfields[ $tablefield_field_lowercased ], $matches );
$fieldtype = $matches[1];
$fieldtype_lowercased = strtolower( $fieldtype );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.6-alpha-37537';
$wp_version = '4.6-alpha-37538';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.