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:
parent
1947f4d17c
commit
a5b8dca864
|
@ -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 );
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue