In [32299], we should be using mb_strlen()
for our string size checks.
git-svn-id: https://develop.svn.wordpress.org/trunk@32306 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
45b0abbef1
commit
0152b8f49b
@ -2064,7 +2064,7 @@ class wpdb {
|
||||
}
|
||||
}
|
||||
|
||||
if ( false !== $value['length'] && strlen( $value['value'] ) > $value['length'] ) {
|
||||
if ( false !== $value['length'] && mb_strlen( $value['value'] ) > $value['length'] ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -137,5 +137,12 @@ class Tests_Comment extends WP_UnitTestCase {
|
||||
$id = wp_new_comment( $data );
|
||||
|
||||
$this->assertFalse( $id );
|
||||
|
||||
// Cleanup.
|
||||
if ( isset( $remote_addr ) ) {
|
||||
$_SERVER['REMOTE_ADDR'] = $remote_addr;
|
||||
} else {
|
||||
unset( $_SERVER['REMOTE_ADDR'] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user