Changeset 14145
- Timestamp:
- 12/16/2025 01:59:56 PM (6 months ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/classes/class-bp-attachment.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/classes/class-bp-attachment.php
r13901 r14145 297 297 public function sanitize_utf8_filename( $retval ) { 298 298 // PHP 5.4+ or with PECL intl 2.0+ . 299 if ( function_exists( 'transliterator_transliterate' ) && seems_utf8( $retval ) ) { 299 if ( 300 function_exists( 'transliterator_transliterate' ) 301 // wp_is_valid_utf8 is added in WP 6.9. 302 && function_exists( 'wp_is_valid_utf8' ) ? wp_is_valid_utf8( $retval ) : seems_utf8( $retval ) 303 ) { 300 304 $retval = transliterator_transliterate( 'Any-Latin; Latin-ASCII; [\u0080-\u7fff] remove', $retval ); 301 305 … … 306 310 307 311 // Still here? use iconv(). 308 if ( function_exists( 'iconv' ) && seems_utf8( $retval ) ) { 312 if ( 313 function_exists( 'iconv' ) 314 // wp_is_valid_utf8 is added in WP 6.9. 315 && function_exists( 'wp_is_valid_utf8' ) ? wp_is_valid_utf8( $retval ) : seems_utf8( $retval ) 316 ) { 309 317 $retval = iconv( 'UTF-8', 'ASCII//TRANSLIT//IGNORE', $retval ); 310 318 }
Note: See TracChangeset
for help on using the changeset viewer.