Changeset 56510 for trunk/src/wp-includes/functions.php
- Timestamp:
- 09/03/2023 12:49:51 PM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r56497 r56510 3151 3151 finfo_close( $finfo ); 3152 3152 3153 // finfo_file() returns redudant mime type for Google docs, see #57898. 3154 if ( 'application/vnd.openxmlformats-officedocument.wordprocessingml.documentapplication/vnd.openxmlformats-officedocument.wordprocessingml.document' === $real_mime ) { 3155 $real_mime = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; 3153 $google_docs_types = array( 3154 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 3155 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 3156 ); 3157 3158 foreach ( $google_docs_types as $google_docs_type ) { 3159 /* 3160 * finfo_file() can return duplicate mime type for Google docs, 3161 * this conditional reduces it to a single instance. 3162 * 3163 * @see https://bugs.php.net/bug.php?id=77784 3164 * @see https://core.trac.wordpress.org/ticket/57898 3165 */ 3166 if ( 2 === substr_count( $real_mime, $google_docs_type ) ) { 3167 $real_mime = $google_docs_type; 3168 } 3156 3169 } 3157 3170
Note: See TracChangeset
for help on using the changeset viewer.