Make WordPress Core

Changeset 51401


Ignore:
Timestamp:
07/10/2021 06:42:36 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Twenty Fifteen: Use strict comparison in inc/custom-header.php.

Props kapilpaul.
See #53359.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfifteen/inc/custom-header.php

    r48782 r51401  
    5959    $color = trim( $color, '#' );
    6060
    61     if ( strlen( $color ) == 3 ) {
     61    if ( strlen( $color ) === 3 ) {
    6262        $r = hexdec( substr( $color, 0, 1 ) . substr( $color, 0, 1 ) );
    6363        $g = hexdec( substr( $color, 1, 1 ) . substr( $color, 1, 1 ) );
    6464        $b = hexdec( substr( $color, 2, 1 ) . substr( $color, 2, 1 ) );
    65     } elseif ( strlen( $color ) == 6 ) {
     65    } elseif ( strlen( $color ) === 6 ) {
    6666        $r = hexdec( substr( $color, 0, 2 ) );
    6767        $g = hexdec( substr( $color, 2, 2 ) );
Note: See TracChangeset for help on using the changeset viewer.