Make WordPress Core

Changeset 57833 for trunk


Ignore:
Timestamp:
03/14/2024 02:25:51 PM (9 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison in wp-admin/options-general.php.

Follow-up to [1632], [12507].

Props aristath, poena, afercia, SergeyBiryukov.
See #60700.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/options-general.php

    r57794 r57833  
    355355if ( empty( $tzstring ) ) { // Create a UTC+- zone if no timezone string exists.
    356356    $check_zone_info = false;
    357     if ( 0 == $current_offset ) {
     357    if ( 0 === (int) $current_offset ) {
    358358        $tzstring = 'UTC+0';
    359359    } elseif ( $current_offset < 0 ) {
     
    555555
    556556for ( $day_index = 0; $day_index <= 6; $day_index++ ) :
    557     $selected = ( get_option( 'start_of_week' ) == $day_index ) ? 'selected="selected"' : '';
     557    $selected = ( (int) get_option( 'start_of_week' ) === $day_index ) ? 'selected="selected"' : '';
    558558    echo "\n\t<option value='" . esc_attr( $day_index ) . "' $selected>" . $wp_locale->get_weekday( $day_index ) . '</option>';
    559559endfor;
Note: See TracChangeset for help on using the changeset viewer.