Make WordPress Core


Ignore:
Timestamp:
04/09/2020 03:41:04 PM (5 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-includes/class-wp-theme.php

    r47550 r47557  
    277277            // Default themes always trump their pretenders.
    278278            // Properly identify default themes that are inside a directory within wp-content/themes.
    279             $default_theme_slug = array_search( $this->headers['Name'], self::$default_themes );
     279            $default_theme_slug = array_search( $this->headers['Name'], self::$default_themes, true );
    280280            if ( $default_theme_slug ) {
    281281                if ( basename( $this->stylesheet ) != $default_theme_slug ) {
Note: See TracChangeset for help on using the changeset viewer.