Skip to content

Commit 9a2136f

Browse files
Database: Ensure Non_unique index value is compared as a string in dbDelta().
Follow-up to [1575], [58994]. Props tsteel. Fixes #64005. git-svn-id: https://develop.svn.wordpress.org/trunk@60784 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 1eb428b commit 9a2136f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-admin/includes/upgrade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3282,7 +3282,7 @@ function dbDelta( $queries = '', $execute = true ) { // phpcs:ignore WordPress.N
32823282
'fieldname' => $tableindex->Column_name,
32833283
'subpart' => $tableindex->Sub_part,
32843284
);
3285-
$index_ary[ $keyname ]['unique'] = ( '0' === $tableindex->Non_unique ) ? true : false;
3285+
$index_ary[ $keyname ]['unique'] = ( '0' === (string) $tableindex->Non_unique ) ? true : false;
32863286
$index_ary[ $keyname ]['index_type'] = $tableindex->Index_type;
32873287
}
32883288

0 commit comments

Comments
 (0)