Changeset 47550 for trunk/src/wp-includes/functions.php
- Timestamp:
- 04/05/2020 03:00:44 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r47461 r47550 2735 2735 $ext2type = wp_get_ext_types(); 2736 2736 foreach ( $ext2type as $type => $exts ) { 2737 if ( in_array( $ext, $exts ) ) {2737 if ( in_array( $ext, $exts, true ) ) { 2738 2738 return $type; 2739 2739 } … … 2882 2882 if ( in_array( $real_mime, $nonspecific_types, true ) ) { 2883 2883 // File is a non-specific binary type. That's ok if it's a type that generally tends to be binary. 2884 if ( ! in_array( substr( $type, 0, strcspn( $type, '/' ) ), array( 'application', 'video', 'audio' ) ) ) {2884 if ( ! in_array( substr( $type, 0, strcspn( $type, '/' ) ), array( 'application', 'video', 'audio' ), true ) ) { 2885 2885 $type = false; 2886 2886 $ext = false; … … 2906 2906 'text/tsv', 2907 2907 'text/vtt', 2908 ) 2908 ), 2909 true 2909 2910 ) 2910 2911 ) { … … 2920 2921 'text/plain', 2921 2922 'application/rtf', 2922 ) 2923 ), 2924 true 2923 2925 ) 2924 2926 ) { … … 2942 2944 $allowed = get_allowed_mime_types(); 2943 2945 2944 if ( ! in_array( $type, $allowed ) ) {2946 if ( ! in_array( $type, $allowed, true ) ) { 2945 2947 $type = false; 2946 2948 $ext = false; … … 5236 5238 if ( function_exists( 'apache_get_modules' ) ) { 5237 5239 $mods = apache_get_modules(); 5238 if ( in_array( $mod, $mods ) ) {5240 if ( in_array( $mod, $mods, true ) ) { 5239 5241 return true; 5240 5242 } … … 5318 5320 5319 5321 // Files not in the allowed file list are not allowed: 5320 if ( ! empty( $allowed_files ) && ! in_array( $file, $allowed_files ) ) {5322 if ( ! empty( $allowed_files ) && ! in_array( $file, $allowed_files, true ) ) { 5321 5323 return 3; 5322 5324 } … … 5729 5731 foreach ( timezone_identifiers_list() as $zone ) { 5730 5732 $zone = explode( '/', $zone ); 5731 if ( ! in_array( $zone[0], $continents ) ) {5733 if ( ! in_array( $zone[0], $continents, true ) ) { 5732 5734 continue; 5733 5735 } … … 6317 6319 $caller[] = "{$call['class']}{$call['type']}{$call['function']}"; 6318 6320 } else { 6319 if ( in_array( $call['function'], array( 'do_action', 'apply_filters', 'do_action_ref_array', 'apply_filters_ref_array' ) ) ) {6321 if ( in_array( $call['function'], array( 'do_action', 'apply_filters', 'do_action_ref_array', 'apply_filters_ref_array' ), true ) ) { 6320 6322 $caller[] = "{$call['function']}('{$call['args'][0]}')"; 6321 } elseif ( in_array( $call['function'], array( 'include', 'include_once', 'require', 'require_once' ) ) ) {6323 } elseif ( in_array( $call['function'], array( 'include', 'include_once', 'require', 'require_once' ), true ) ) { 6322 6324 $filename = isset( $call['args'][0] ) ? $call['args'][0] : ''; 6323 6325 $caller[] = $call['function'] . "('" . str_replace( $truncate_paths, '', wp_normalize_path( $filename ) ) . "')"; … … 6448 6450 $screen = get_current_screen(); 6449 6451 $hidden = array( 'update', 'update-network', 'update-core', 'update-core-network', 'upgrade', 'upgrade-network', 'network' ); 6450 $show = ! in_array( $screen->id, $hidden );6452 $show = ! in_array( $screen->id, $hidden, true ); 6451 6453 6452 6454 /**
Note: See TracChangeset
for help on using the changeset viewer.