Changeset 56326
- Timestamp:
- 07/31/2023 01:31:28 PM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r56211 r56326 1062 1062 $k = urlencode( $k ); 1063 1063 } 1064 if ( is_int( $k ) && null != $prefix ) { 1064 1065 if ( is_int( $k ) && null !== $prefix ) { 1065 1066 $k = $prefix . $k; 1066 1067 } 1068 1067 1069 if ( ! empty( $key ) ) { 1068 1070 $k = $key . '%5B' . $k . '%5D'; 1069 1071 } 1072 1070 1073 if ( null === $v ) { 1071 1074 continue; … … 1773 1776 1774 1777 $suppress = $wpdb->suppress_errors(); 1778 1775 1779 if ( ! wp_installing() ) { 1776 1780 $alloptions = wp_load_alloptions(); 1777 1781 } 1782 1778 1783 // If siteurl is not set to autoload, check it specifically. 1779 1784 if ( ! isset( $alloptions['siteurl'] ) ) { … … 1782 1787 $installed = $alloptions['siteurl']; 1783 1788 } 1789 1784 1790 $wpdb->suppress_errors( $suppress ); 1785 1791 … … 1806 1812 foreach ( $wp_tables as $table ) { 1807 1813 // The existence of custom user tables shouldn't suggest an unwise state or prevent a clean installation. 1808 if ( defined( 'CUSTOM_USER_TABLE' ) && CUSTOM_USER_TABLE == $table ) {1814 if ( defined( 'CUSTOM_USER_TABLE' ) && CUSTOM_USER_TABLE === $table ) { 1809 1815 continue; 1810 1816 } 1811 if ( defined( 'CUSTOM_USER_META_TABLE' ) && CUSTOM_USER_META_TABLE == $table ) { 1817 1818 if ( defined( 'CUSTOM_USER_META_TABLE' ) && CUSTOM_USER_META_TABLE === $table ) { 1812 1819 continue; 1813 1820 } … … 2081 2088 * the $dir_perms correctly with chmod() 2082 2089 */ 2083 if ( ( $dir_perms & ~umask() ) != $dir_perms ) {2090 if ( ( $dir_perms & ~umask() ) !== $dir_perms ) { 2084 2091 $folder_parts = explode( '/', substr( $target, strlen( $target_parent ) + 1 ) ); 2085 2092 for ( $i = 1, $c = count( $folder_parts ); $i <= $c; $i++ ) { … … 2431 2438 $url = get_option( 'upload_url_path' ); 2432 2439 if ( ! $url ) { 2433 if ( empty( $upload_path ) || ( 'wp-content/uploads' === $upload_path ) || ( $upload_path == $dir ) ) {2440 if ( empty( $upload_path ) || ( 'wp-content/uploads' === $upload_path ) || ( $upload_path === $dir ) ) { 2434 2441 $url = WP_CONTENT_URL . '/uploads'; 2435 2442 } else { … … 3096 3103 $real_mime = wp_get_image_mime( $file ); 3097 3104 3098 if ( $real_mime && $real_mime != $type ) {3105 if ( $real_mime && $real_mime !== $type ) { 3099 3106 /** 3100 3107 * Filters the list mapping image mime types to their respective extensions. … … 3123 3130 $new_filename = implode( '.', $filename_parts ); 3124 3131 3125 if ( $new_filename != $filename ) {3132 if ( $new_filename !== $filename ) { 3126 3133 $proper_filename = $new_filename; // Mark that it changed. 3127 3134 } 3135 3128 3136 // Redefine the extension / MIME. 3129 3137 $wp_filetype = wp_check_filetype( $new_filename, $mimes ); … … 4788 4796 4789 4797 // New subpattern? 4790 if ( $firstchar != $subchar ) {4798 if ( $firstchar !== $subchar ) { 4791 4799 if ( '' !== $subchar ) { 4792 4800 $wp_smiliessearch .= ')(?=' . $spaces . '|$)'; // End previous "subpattern". 4793 4801 $wp_smiliessearch .= '|(?<=' . $spaces . '|^)'; // Begin another "subpattern". 4794 4802 } 4803 4795 4804 $subchar = $firstchar; 4796 4805 $wp_smiliessearch .= preg_quote( $firstchar, '/' ) . '(?:'; … … 4798 4807 $wp_smiliessearch .= '|'; 4799 4808 } 4809 4800 4810 $wp_smiliessearch .= preg_quote( $rest, '/' ); 4801 4811 } … … 5939 5949 $server_parts[1] = isset( $server_parts[1] ) ? $server_parts[1] : ''; 5940 5950 5941 return ( 'lighttpd' === $server_parts[0] && -1 == version_compare( $server_parts[1], '1.5.0' ) );5951 return ( 'lighttpd' === $server_parts[0] && -1 === version_compare( $server_parts[1], '1.5.0' ) ); 5942 5952 } 5943 5953 … … 6348 6358 return false; 6349 6359 } 6360 6350 6361 return round( timezone_offset_get( $timezone_object, $datetime_object ) / HOUR_IN_SECONDS, 2 ); 6351 6362 } … … 6368 6379 return -1 * ( strnatcasecmp( $a['city'], $b['city'] ) ); 6369 6380 } 6381 6370 6382 if ( 'UTC' === $a['city'] ) { 6371 6383 if ( str_starts_with( $b['city'], 'GMT+' ) ) { 6372 6384 return 1; 6373 6385 } 6386 6374 6387 return -1; 6375 6388 } 6389 6376 6390 if ( 'UTC' === $b['city'] ) { 6377 6391 if ( str_starts_with( $a['city'], 'GMT+' ) ) { 6378 6392 return -1; 6379 6393 } 6394 6380 6395 return 1; 6381 6396 } 6397 6382 6398 return strnatcasecmp( $a['city'], $b['city'] ); 6383 6399 } 6384 if ( $a['t_continent'] == $b['t_continent'] ) { 6385 if ( $a['t_city'] == $b['t_city'] ) { 6400 6401 if ( $a['t_continent'] === $b['t_continent'] ) { 6402 if ( $a['t_city'] === $b['t_city'] ) { 6386 6403 return strnatcasecmp( $a['t_subcity'], $b['t_subcity'] ); 6387 6404 } 6405 6388 6406 return strnatcasecmp( $a['t_city'], $b['t_city'] ); 6389 6407 } else { … … 6392 6410 return 1; 6393 6411 } 6412 6394 6413 if ( 'Etc' === $b['continent'] ) { 6395 6414 return -1; 6396 6415 } 6416 6397 6417 return strnatcasecmp( $a['t_continent'], $b['t_continent'] ); 6398 6418 } … … 6914 6934 6915 6935 // Tortoise got lapped - must be a loop. 6916 if ( $tortoise == $evanescent_hare || $tortoise== $hare ) {6936 if ( $tortoise === $evanescent_hare || $tortoise === $hare ) { 6917 6937 return $_return_loop ? $return : $tortoise; 6918 6938 } … … 7011 7031 $skip_frames--; 7012 7032 } elseif ( isset( $call['class'] ) ) { 7013 if ( $check_class && $ignore_class == $call['class'] ) {7033 if ( $check_class && $ignore_class === $call['class'] ) { 7014 7034 continue; // Filter out calls. 7015 7035 }
Note: See TracChangeset
for help on using the changeset viewer.