Make WordPress Core

Changeset 56596


Ignore:
Timestamp:
09/16/2023 06:48:59 AM (13 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Remove extra parentheses in a few str_contains() conditionals.

Follow-up to [55988].

Props Cybr.
See #58831.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/formatting.php

    r56561 r56596  
    45234523    }
    45244524
    4525     if ( ( str_contains( $url, '[' ) ) || ( str_contains( $url, ']' ) ) ) {
     4525    if ( str_contains( $url, '[' ) || str_contains( $url, ']' ) ) {
    45264526
    45274527        $parsed = wp_parse_url( $url );
  • trunk/src/wp-includes/vars.php

    r56224 r56596  
    9292    } elseif ( stripos( $_SERVER['HTTP_USER_AGENT'], 'safari' ) !== false ) {
    9393        $is_safari = true;
    94     } elseif ( ( str_contains( $_SERVER['HTTP_USER_AGENT'], 'MSIE' ) || str_contains( $_SERVER['HTTP_USER_AGENT'], 'Trident' ) ) && str_contains( $_SERVER['HTTP_USER_AGENT'], 'Win' ) ) {
     94    } elseif ( ( str_contains( $_SERVER['HTTP_USER_AGENT'], 'MSIE' ) || str_contains( $_SERVER['HTTP_USER_AGENT'], 'Trident' ) )
     95        && str_contains( $_SERVER['HTTP_USER_AGENT'], 'Win' )
     96    ) {
    9597        $is_winIE = true;
    9698    } elseif ( str_contains( $_SERVER['HTTP_USER_AGENT'], 'MSIE' ) && str_contains( $_SERVER['HTTP_USER_AGENT'], 'Mac' ) ) {
  • trunk/src/wp-mail.php

    r55988 r56596  
    108108                $content_transfer_encoding = $content_transfer_encoding[0];
    109109            }
    110             if ( ( 'multipart/alternative' === $content_type ) && ( str_contains( $line, 'boundary="' ) ) && ( '' === $boundary ) ) {
     110            if ( 'multipart/alternative' === $content_type && str_contains( $line, 'boundary="' ) && '' === $boundary ) {
    111111                $boundary = trim( $line );
    112112                $boundary = explode( '"', $boundary );
Note: See TracChangeset for help on using the changeset viewer.