Coding Standards: Restore correct regex formatting in `dbDelta()`.

An earlier regex for normalizing index definitions disables the PHPCS check for extra padding in order to keep a more readable indentation. However, this was missed for index columns regex.

Follow-up to [37583], [42228], [42249], [42343].

See #55647.
Built from https://develop.svn.wordpress.org/trunk@53896


git-svn-id: http://core.svn.wordpress.org/trunk@53455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2022-08-14 02:14:12 +00:00
parent 8a9a20c3ee
commit 0e6a976c0a
2 changed files with 18 additions and 16 deletions

View File

@ -2891,6 +2891,7 @@ function dbDelta( $queries = '', $execute = true ) { // phpcs:ignore WordPress.N
// Normalize columns.
foreach ( $index_columns as $id => &$index_column ) {
// Extract column name and number of indexed characters (sub_part).
// phpcs:disable Squiz.Strings.ConcatenationSpacing.PaddingFound -- don't remove regex indentation
preg_match(
'/'
. '`?' // Name can be escaped with a backtick.
@ -2912,6 +2913,7 @@ function dbDelta( $queries = '', $execute = true ) { // phpcs:ignore WordPress.N
$index_column,
$index_column_matches
);
// phpcs:enable
// Escape the column name with backticks.
$index_column = '`' . $index_column_matches['column_name'] . '`';

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.1-alpha-53895';
$wp_version = '6.1-alpha-53896';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.