Skip to content

Commit 86547ee

Browse files
committed
clean up the regex
1 parent 3704af6 commit 86547ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wp-includes/sqlite/class-wp-sqlite-translator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3761,7 +3761,7 @@ function ( $column ) use ( $table_name, $key_length_limit ) {
37613761
$data_length = $key_length_limit;
37623762

37633763
// Extract the length from the data type. Make it lower if needed. Skip 'unsigned' parts and whitespace.
3764-
if ( 1 === preg_match( '/^(\w+)\s*\(\s*(\d+)\s*\)\s*(.*)?$/', $data_type, $matches ) ) {
3764+
if ( 1 === preg_match( '/^(\w+)\s*\(\s*(\d+)\s*\)/', $data_type, $matches ) ) {
37653765
$data_type = $matches[1]; // "varchar"
37663766
$data_length = min( $matches[2], $key_length_limit ); // "255"
37673767
}

0 commit comments

Comments
 (0)