Make WordPress Core


Ignore:
Timestamp:
04/09/2020 03:41:04 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict type check for in_array() and array_search().

This addresses all the remaining WordPress.PHP.StrictInArray.MissingTrueStrict issues in core.

Includes minor code layout fixes for better readability.

Follow-up to [47550].

See #49542.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-filesystem-base.php

    r47122 r47557  
    402402
    403403        for ( $i = 0, $c = count( $attarray ); $i < $c; $i++ ) {
    404             $key = array_search( $attarray[ $i ], $legal );
     404            $key = array_search( $attarray[ $i ], $legal, true );
    405405            if ( $key ) {
    406406                $realmode .= $legal[ $key ];
Note: See TracChangeset for help on using the changeset viewer.