mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Coding Standards: Use strict comparison where strlen() is involved.
Follow-up to [649], [1345], [3034], [6132], [6314], [6974], [55642]. Props aristath, poena, afercia, SergeyBiryukov. See #57839. git-svn-id: https://develop.svn.wordpress.org/trunk@55652 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -898,7 +898,7 @@ function seems_utf8( $str ) {
|
||||
return false; // Does not match any model.
|
||||
}
|
||||
for ( $j = 0; $j < $n; $j++ ) { // n bytes matching 10bbbbbb follow ?
|
||||
if ( ( ++$i == $length ) || ( ( ord( $str[ $i ] ) & 0xC0 ) != 0x80 ) ) {
|
||||
if ( ( ++$i === $length ) || ( ( ord( $str[ $i ] ) & 0xC0 ) != 0x80 ) ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -5138,7 +5138,7 @@ function wp_sprintf( $pattern, ...$args ) {
|
||||
$arg_index = 0;
|
||||
while ( $len > $start ) {
|
||||
// Last character: append and break.
|
||||
if ( strlen( $pattern ) - 1 == $start ) {
|
||||
if ( strlen( $pattern ) - 1 === $start ) {
|
||||
$result .= substr( $pattern, -1 );
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user