Changeset 52475
- Timestamp:
- 01/06/2022 06:14:56 PM (3 years ago)
- Location:
- branches/4.8
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.8
- Property svn:mergeinfo changed
/trunk merged: 52454-52457
- Property svn:mergeinfo changed
-
branches/4.8/src/wp-admin/includes/upgrade.php
r40864 r52475 1249 1249 while( $rows = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options ORDER BY option_id LIMIT $start, 20" ) ) { 1250 1250 foreach ( $rows as $row ) { 1251 $value = $row->option_value;1252 if ( !@unserialize( $value ))1251 $value = maybe_unserialize( $row->option_value ); 1252 if ( $value === $row->option_value ) 1253 1253 $value = stripslashes( $value ); 1254 1254 if ( $value !== $row->option_value ) { -
branches/4.8/src/wp-includes/class-wp-meta-query.php
r38768 r52475 718 718 $sibling_compare = strtoupper( $sibling['compare'] ); 719 719 if ( in_array( $clause_compare, $compatible_compares ) && in_array( $sibling_compare, $compatible_compares ) ) { 720 $alias = $sibling['alias'];720 $alias = preg_replace( '/\W/', '_', $sibling['alias'] ); 721 721 break; 722 722 } -
branches/4.8/src/wp-includes/class-wp-tax-query.php
r39662 r52475 544 544 // The sibling must both have compatible operator to share its alias. 545 545 if ( in_array( strtoupper( $sibling['operator'] ), $compatible_operators ) ) { 546 $alias = $sibling['alias'];546 $alias = preg_replace( '/\W/', '_', $sibling['alias'] ); 547 547 break; 548 548 } … … 574 574 } 575 575 576 $query['terms'] = array_unique( (array) $query['terms'] ); 576 if ( 'slug' === $query['field'] || 'name' === $query['field'] ) { 577 $query['terms'] = array_unique( (array) $query['terms'] ); 578 } else { 579 $query['terms'] = wp_parse_id_list( $query['terms'] ); 580 } 577 581 578 582 if ( is_taxonomy_hierarchical( $query['taxonomy'] ) && $query['include_children'] ) { -
branches/4.8/src/wp-includes/formatting.php
r49398 r52475 1071 1071 * 1072 1072 * @since 1.5.0 1073 * 1074 * @param string $utf8_string 1075 * @param int $length Max length of the string 1073 * @since 5.8.3 Added the `encode_ascii_characters` parameter. 1074 * 1075 * @param string $utf8_string String to encode. 1076 * @param int $length Max length of the string 1077 * @param bool $encode_ascii_characters Whether to encode ascii characters such as < " ' 1076 1078 * @return string String with Unicode encoded for URI. 1077 1079 */ 1078 function utf8_uri_encode( $utf8_string, $length = 0 ) {1080 function utf8_uri_encode( $utf8_string, $length = 0, $encode_ascii_characters = false ) { 1079 1081 $unicode = ''; 1080 1082 $values = array(); … … 1091 1093 1092 1094 if ( $value < 128 ) { 1093 if ( $length && ( $unicode_length >= $length ) ) { 1095 $char = chr( $value ); 1096 $encoded_char = $encode_ascii_characters ? rawurlencode( $char ) : $char; 1097 $encoded_char_length = strlen( $encoded_char ); 1098 if ( $length && ( $unicode_length + $encoded_char_length ) > $length ) { 1094 1099 break; 1095 1100 } 1096 $unicode .= chr( $value );1097 $unicode_length ++;1101 $unicode .= $encoded_char; 1102 $unicode_length += $encoded_char_length; 1098 1103 } else { 1099 1104 if ( count( $values ) == 0 ) { -
branches/4.8/src/wp-includes/post.php
r47649 r52475 3823 3823 $slug = substr( $slug, 0, $length ); 3824 3824 else 3825 $slug = utf8_uri_encode( $decoded_slug, $length );3825 $slug = utf8_uri_encode( $decoded_slug, $length, true ); 3826 3826 } 3827 3827
Note: See TracChangeset
for help on using the changeset viewer.