Skip to content

Commit a6c240e

Browse files
committed
clean up the regex
1 parent c698426 commit a6c240e

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
@@ -3762,7 +3762,7 @@ function ( $column ) use ( $table_name, $key_length_limit ) {
37623762
$data_length = $key_length_limit;
37633763

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

0 commit comments

Comments
 (0)