Changeset 52482
- Timestamp:
- 01/06/2022 06:23:29 PM (3 years ago)
- Location:
- branches/4.1
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.1
- Property svn:mergeinfo changed
/trunk merged: 52454-52457
- Property svn:mergeinfo changed
-
branches/4.1/src/wp-admin/includes/upgrade.php
r32431 r52482 1078 1078 while( $rows = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options ORDER BY option_id LIMIT $start, 20" ) ) { 1079 1079 foreach( $rows as $row ) { 1080 $value = $row->option_value;1081 if ( !@unserialize( $value ))1080 $value = maybe_unserialize( $row->option_value ); 1081 if ( $value === $row->option_value ) 1082 1082 $value = stripslashes( $value ); 1083 1083 if ( $value !== $row->option_value ) { -
branches/4.1/src/wp-includes/formatting.php
r47658 r52482 864 864 * 865 865 * @since 1.5.0 866 * @since 5.8.3 Added the `encode_ascii_characters` parameter. 866 867 * 867 868 * @param string $utf8_string 868 869 * @param int $length Max length of the string 870 * @param bool $encode_ascii_characters Whether to encode ascii characters such as < " ' 869 871 * @return string String with Unicode encoded for URI. 870 872 */ 871 function utf8_uri_encode( $utf8_string, $length = 0 ) {873 function utf8_uri_encode( $utf8_string, $length = 0, $encode_ascii_characters = false ) { 872 874 $unicode = ''; 873 875 $values = array(); … … 884 886 885 887 if ( $value < 128 ) { 886 if ( $length && ( $unicode_length >= $length ) ) 888 $char = chr( $value ); 889 $encoded_char = $encode_ascii_characters ? rawurlencode( $char ) : $char; 890 $encoded_char_length = strlen( $encoded_char ); 891 if ( $length && ( $unicode_length + $encoded_char_length ) > $length ) { 887 892 break; 888 $unicode .= chr($value); 889 $unicode_length++; 893 } 894 $unicode .= $encoded_char; 895 $unicode_length += $encoded_char_length; 890 896 } else { 891 897 if ( count( $values ) == 0 ) $num_octets = ( $value < 224 ) ? 2 : 3; -
branches/4.1/src/wp-includes/meta.php
r49405 r52482 1502 1502 $sibling_compare = strtoupper( $sibling['compare'] ); 1503 1503 if ( in_array( $clause_compare, $compatible_compares ) && in_array( $sibling_compare, $compatible_compares ) ) { 1504 $alias = $sibling['alias'];1504 $alias = preg_replace( '/\W/', '_', $sibling['alias'] ); 1505 1505 break; 1506 1506 } -
branches/4.1/src/wp-includes/post.php
r43401 r52482 3784 3784 $slug = substr( $slug, 0, $length ); 3785 3785 else 3786 $slug = utf8_uri_encode( $decoded_slug, $length );3786 $slug = utf8_uri_encode( $decoded_slug, $length, true ); 3787 3787 } 3788 3788 -
branches/4.1/src/wp-includes/taxonomy.php
r37138 r52482 1147 1147 // The sibling must both have compatible operator to share its alias. 1148 1148 if ( in_array( strtoupper( $sibling['operator'] ), $compatible_operators ) ) { 1149 $alias = $sibling['alias'];1149 $alias = preg_replace( '/\W/', '_', $sibling['alias'] ); 1150 1150 break; 1151 1151 } … … 1177 1177 } 1178 1178 1179 $query['terms'] = array_unique( (array) $query['terms'] ); 1179 if ( 'slug' === $query['field'] || 'name' === $query['field'] ) { 1180 $query['terms'] = array_unique( (array) $query['terms'] ); 1181 } else { 1182 $query['terms'] = wp_parse_id_list( $query['terms'] ); 1183 } 1180 1184 1181 1185 if ( is_taxonomy_hierarchical( $query['taxonomy'] ) && $query['include_children'] ) {
Note: See TracChangeset
for help on using the changeset viewer.