File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -898,7 +898,7 @@ function seems_utf8( $str ) {
898898 return false ; // Does not match any model.
899899 }
900900 for ( $ j = 0 ; $ j < $ n ; $ j ++ ) { // n bytes matching 10bbbbbb follow ?
901- if ( ( ++$ i == $ length ) || ( ( ord ( $ str [ $ i ] ) & 0xC0 ) != 0x80 ) ) {
901+ if ( ( ++$ i === $ length ) || ( ( ord ( $ str [ $ i ] ) & 0xC0 ) != 0x80 ) ) {
902902 return false ;
903903 }
904904 }
@@ -5138,7 +5138,7 @@ function wp_sprintf( $pattern, ...$args ) {
51385138 $ arg_index = 0 ;
51395139 while ( $ len > $ start ) {
51405140 // Last character: append and break.
5141- if ( strlen ( $ pattern ) - 1 == $ start ) {
5141+ if ( strlen ( $ pattern ) - 1 === $ start ) {
51425142 $ result .= substr ( $ pattern , -1 );
51435143 break ;
51445144 }
Original file line number Diff line number Diff line change @@ -1330,7 +1330,7 @@ function wp_kses_hair( $attr, $allowed_protocols ) {
13301330
13311331 // Loop through the whole attribute list.
13321332
1333- while ( strlen ( $ attr ) != 0 ) {
1333+ while ( strlen ( $ attr ) !== 0 ) {
13341334 $ working = 0 ; // Was the last operation successful?
13351335
13361336 switch ( $ mode ) {
Original file line number Diff line number Diff line change @@ -40,7 +40,9 @@ function wp_fix_server_vars() {
4040 $ _SERVER = array_merge ( $ default_server_values , $ _SERVER );
4141
4242 // Fix for IIS when running with PHP ISAPI.
43- if ( empty ( $ _SERVER ['REQUEST_URI ' ] ) || ( 'cgi-fcgi ' !== PHP_SAPI && preg_match ( '/^Microsoft-IIS\// ' , $ _SERVER ['SERVER_SOFTWARE ' ] ) ) ) {
43+ if ( empty ( $ _SERVER ['REQUEST_URI ' ] )
44+ || ( 'cgi-fcgi ' !== PHP_SAPI && preg_match ( '/^Microsoft-IIS\// ' , $ _SERVER ['SERVER_SOFTWARE ' ] ) )
45+ ) {
4446
4547 if ( isset ( $ _SERVER ['HTTP_X_ORIGINAL_URL ' ] ) ) {
4648 // IIS Mod-Rewrite.
@@ -71,7 +73,9 @@ function wp_fix_server_vars() {
7173 }
7274
7375 // Fix for PHP as CGI hosts that set SCRIPT_FILENAME to something ending in php.cgi for all requests.
74- if ( isset ( $ _SERVER ['SCRIPT_FILENAME ' ] ) && ( strpos ( $ _SERVER ['SCRIPT_FILENAME ' ], 'php.cgi ' ) == strlen ( $ _SERVER ['SCRIPT_FILENAME ' ] ) - 7 ) ) {
76+ if ( isset ( $ _SERVER ['SCRIPT_FILENAME ' ] )
77+ && ( strpos ( $ _SERVER ['SCRIPT_FILENAME ' ], 'php.cgi ' ) === strlen ( $ _SERVER ['SCRIPT_FILENAME ' ] ) - 7 )
78+ ) {
7579 $ _SERVER ['SCRIPT_FILENAME ' ] = $ _SERVER ['PATH_TRANSLATED ' ];
7680 }
7781
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ function get_the_ID() { // phpcs:ignore WordPress.NamingConventions.ValidFunctio
4242function the_title ( $ before = '' , $ after = '' , $ display = true ) {
4343 $ title = get_the_title ();
4444
45- if ( strlen ( $ title ) == 0 ) {
45+ if ( strlen ( $ title ) === 0 ) {
4646 return ;
4747 }
4848
@@ -88,7 +88,7 @@ function the_title_attribute( $args = '' ) {
8888
8989 $ title = get_the_title ( $ parsed_args ['post ' ] );
9090
91- if ( strlen ( $ title ) == 0 ) {
91+ if ( strlen ( $ title ) === 0 ) {
9292 return ;
9393 }
9494
You can’t perform that action at this time.
0 commit comments